How to reroute all urls in Zend Framework?
I got url aliases table in db and every time i want to reroute url to module, controller, action and arguments from db.
I'm doing this:
$frontController = Zend_Control开发者_JAVA技巧ler_Front::getInstance();
$route = new Zend_Controller_Router_Route(
':city/:name',
array($arr_params->controller, $arr_params->action, $arr_params->module), array($arr_args));
$frontController->getRouter()->addRoute('h', $route);
But it doesn't work. How to make it work for all urls?
It sounds like you need a custom route class. See a similar response here:
how to get dynamic URL like mydomain.com/username using zend framework
精彩评论