I'm attempting to do some custom routing so that my admin panel pages can all coexist under the Admin URL segment. So far, this is not working.
I've got the following rules defined:
core.php:
Configure::write('Routing.prefixes', array('landing'));
routes.php:
Router::connect('/admin/landing/:action/', array('controller' => 'admin', 'landing' => true, 'prefix' => 'landing'));
Router::connect('/admin/landing/:action/*', array('controller' => 'admin', 'landing' => true, 'prefix' => 'landing'));
I've also tried specifying an action manually and even a completely static route:
Router::connect('/admin/landing/edit/*', array('controller' => 'admin', 'action' => 'landing_edit'));
This also doesn't work.
It's worth mentioning that this Cake site is semi-encapsulated inside a legacy application; as a result the URL hierarchy goes hostname/pages/controller
instead of hostname/controller
. I've also tried including the /pages
in the route pattern, but this has had no effect.
EDIT: Alright, this appears to be stupidity on my part - an earlier route was unexpectedly pre-empting my newer rule. Thanks to Robert Rozas for pointing me in the right direction via the comments.