why is my route defined in a .ini file not working?

gsmumbo

New Member
In my \[code\]Bootstrap.php\[/code\] I have the following code which defines a route:\[code\] $router = Zend_Controller_Front::getInstance()->getRouter(); $router->addRoute('pageDetails', new Zend_Controller_Router_Route('page-details/:uid/:title', array( 'module' => 'default', 'controller' => 'list', 'action' => 'detail', ), array( 'uid' => '\d+', 'title' => '(.*)?', )));\[/code\]This works.Then I tried to change the route setup to using a \[code\].ini\[/code\] file where the routes are defined. The \[code\].ini\[/code\] file looks like this:\[code\][routes]pageDetails.route = "page-details/:uid/:title"pageDetails.default.module = "default"pageDetails.default.controller = "list"pageDetails.default.action = "detail"pageDetails.reqs.uid = "\d+"pageDetails.reqs.title = "(.*)?"\[/code\]And I add the routes in \[code\]Bootstrap.php\[/code\] via:\[code\] $config = Zend_Registry::get('config'); $router = Zend_Controller_Front::getInstance()->getRouter(); $router->addConfig(new Zend_Config_Ini($config['routes']['configPathname'], 'routes'));\[/code\]Although the \[code\].ini\[/code\] version and the route defined in PHP code should do exactly the same, the \[code\].ini\[/code\] version does not work. There is no error message in the frontend, the links look allright but on clicking a link with this route I just get redirected to the start page.What is missing?
 
Back
Top