My apologies for the title of this question not being very descriptive but the truth is I'm not too sure what the correct terminology for this question is. I am new to using Zend Framework.
Imagine this url: www.foo.com/bar The code below takes "bar" and passes it through to the index controller's load action. However I have another controller called "mypresentation" which is getting ignored now the router below has been added to the Bootstrap.
$route = new Zend_Controller_Router_Route(
'/:prospect',
array('controller'=>'index', 'action' => 'load'));
$router->addRoute('load', $route);
How to I make the router ignore hardcoded controllers ?
Any help is much appreciated and I'll change the title if I can when I have more information.
Alex.
FIX:
$prospectRoute = new Zend_Controller_Router_Route(
'/:prospect',
array('controller'=>'index', 'action' => 'load')
);
$route2 = new Zend_Controller_Router_Route(
'mypresentation',
array('controller' => 'mypresentation')
);
$router->addRoute('index', $prospectRoute);
$router->addRoute('mypresentation', $route2);
'/whatever'
first... Maybe it can be chained to match after the default routes are checked. – Darryl E. Clarke