我有一个很大的旧路由列表,我需要重定向到新路由.
原文链接:https://www.f2er.com/php/133692.html我已经在Bootstrap中定义了自定义路由:
protected function _initRoutes() { $router = Zend_Controller_Front::getInstance()->getRouter(); $oldRoute = 'old/route.html'; $newRoute = 'new/route/*'; //how do I add a 301 redirect to the new route? $router->addRoute('new_route',new Zend_Controller_Router_Route($newRoute,array('controller' =>'fancy','action' => 'route') )); }