I have the following routes set up for the front end of my app:

Router::connect('/become-our-client', array('controller' => 'users',
'action' => 'register'));

Router::connect('/contact-us', array('controller' => 'contact',
'action' => 'contact_us'));

Router::connect('/latest-projects', array('controller' => 'portfolio',
'action' => 'index'));

Router::connect('/latest-projects/*', array('controller' =>
'portfolio', 'action' => 'view'));

Router::connect('/', array('controller' => 'pages', 'action' =>
'display', 'home'));

Router::connect('/*', array('controller' => 'pages', 'action' =>
'display'));

The problem i have is with the first two links, become-our-client and
contact-us. Cake calls the pages controller instead of what i
specified for these routes and returns a view not found error. The
latest-projects link on the other hand works perfectly. I don't
understand what the problem is, from what i've read about it and
programmed so far in cake, the routes are parsed in the order they are
declared in the routes.php file, so /contact-us should allways lead to
what i've specified, and anything else in the form /* will be routed
to the pages controller.
If i leave the default route /pages/* it works fine but it is not an
option for this project.
I don't understand what the problem is, i've built similar routing
rules for other apps i created in cake and never encountered such an
issue. Could it be a bug with the latest cake 1.2.2.1820 stable
version?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to