cakephp routing problem, plugin routing works but not others
I'm having a strange routing problem with a site I just uploaded, and I've made a number of changes to test wh开发者_运维百科at's happening. It doesn't make any sense.
My setup is:
I'm using one plugin, which I've included all the routing in the routes.php file.
I've also included the routes for two other controllers, 'events' and 'updates'
they look like this:
Router::connect('/login', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'login'));
Router::connect('/logout', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'logout'));
Router::connect( '/events/', array( 'controller' => 'events', 'action' => 'index'));
Router::connect('/updates', array('controller' => 'updates', 'action' => 'index'));
What happens when I try to get to 'events' is that I get an error message saying:
"Not Found Error: The requested address '/Events' was not found on this server."
I've checked the database and it's accessible, through the plugin's model/controller/view.
I've also made sure the model/controllers for 'events' and 'updates' are there.
Can anyone tell me how to trouble shoot this?
Thanks, Paul
Do you open /events or /Events? URL-s - except the domain part - are case sensitive.
Thanks Sibidiba,
As it turns out this happened because there was a user model and user controller in the application folder as well as the plugins controller. So the routing treated other controllers as if they weren't there.
All fixed now.
Cheers, Paul
精彩评论