I need to redirect the default CakePHP home page / or (/pages/home) to /users/dashboard page
I tried
Router::connect('/', array('controller' => 'users', 'action' => 'dashboard'));
and
Router::connect('/pages/home', array('controller' => 'users', 'action' => 'dashboard'));
But both are not working
You should be able to do this by simply replacing this part of
app/config/routes.php:.. with something like this:
I sense a slight misunderstanding of the topic when you try to map from ‘
/pages/home‘ to your dashboard. ‘/pages/home‘ only seems like the home page because there exists a route for that. If you want to change the homepage, you need to change the existingRouter::connect('/', ...)rule. If you create a new rule for ‘/‘, underneath, it won’t be executed as CakePHP will match the first route it finds.