Friday, July 20, 2012

router help

Hello,

I am having some issues with my routes, I have put in the below route so I can have my front end pages all go to my contents controller view page.
e.g. /home shows /contents/view/home or /about-us shows /contents/view/about-us (I'm using a slug)

Router::connect('/*', array('controller' => 'contents', 'action' => 'view'));

This works as needed for that part however now all of my other controller links are routing to the same area.

e.g. /admin/users/login or /users/index etc all go to the contents/view controller / action.

How can I get around this so both items work?

If I remove the * from above. i.e. Router::connect('/', array('controller' => 'contents', 'action' => 'view')); the home page works but none of the other pages (e.g. /about-us) work but all my other controllers will work.

Thanks

Thanks

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate