Is it possible to use the Routes ID to redirect to within the controller?
For example, I predefine the login and logout URL with the id of login and logout. In my controller I determine the user needs to be logged out, can I redirect them to that route using the routes id?
Bootstrap
$router->addRoute('logout',new Zend_Controller_Router_Route('logout', array('module' => 'user', 'controller' => 'index', 'action' => 'logout'))); $router->addRoute('login', new Zend_Controller_Router_Route('login', array('module' => 'user', 'controller' => 'index', 'action' => 'login'))); Controller
return $this->_redirect('login'); Currently the above wouldn't work, Id have to use /login (aka the base URL to the route).