Tuesday, November 9, 2010

Routing

By default, requests to your site root are routed by CakePHP to a home view, /apps/views/pages/home.ctp. By changing the routing, you can direct the request to any controller and action you choose.

Edit /app/config/routes.php Comment out
    Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
Then add
    Router::connect('/', array('controller'=>'users', 'action'=>'index'));
Now browse to http://drug-ed.com/ and verify it goes to the users index.

No comments:

Post a Comment