Routing configuration in cakephp

Posted by ShiVik on Stack Overflow See other posts from Stack Overflow or by ShiVik
Published on 2010-06-13T14:44:52Z Indexed on 2010/06/13 14:52 UTC
Read the original article Hit count: 328

Filed under:
|
|

Hello all

I am trying to implement routing in cakephp. I want the urls to mapped like this...

www.example.com/nodes/main -> www.example.com/main www.example.com/nodes/about -> www.example.com/about

So for this I wrote in my config/routes.php file..

Router::connect('/:action', array('controller' => 'nodes'));

Now, I got the thing going but when I click on the links, the url in browser appears like www.example.com/nodes/main www.example.com/nodes/about

Is there some way where I can get the urls to appear the way they are routed? Setting in .htaccess or httpd.conf would be easy - but I don't have access to that.

Regards Vikram

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about routing