How about:

Router::connect('/*', array('controller' => 'sites', 'action' =>
'page'));

Of course, you need to consider the option when someone doesn't send
you the page-id..

On Mar 18, 6:00 pm, koala kid <[email protected]> wrote:
> I am making some changes to a CMS someone else has developed using
> cake. Currently all pages are served up using a controller called
> sites so any given url will look like:
>
> /sites/page-id
>
> However is there a way using Routes to direct the simple /page-id to
> the sites controller.
>
> My Routes currently looks like this:
>
> Router::connect('/', array('controller' => 'sites', 'action' =>
> 'index'));
> Router::connect('/sites/*', array('controller' => 'sites', 'action' =>
> 'page'));
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to