I have a problem with URL rewrite in Zend Framework, I hope someone helps me solve that.
I need to rename module admin as admindev in URL apply for all controller and action.
Here my code write in Bootstrap.php:
public function _initModuleRoutes()
{
$this->bootstrap('FrontController');
$frontController = $this->getResource('FrontController');
$router = $frontController->getRouter();
$route = new Zend_Controller_Router_Route(
'admindev/:action/*',
array(
'module'=>'admin',
'controller'=>':controller',
'action'=>':action'
)
);
$router->addRoute('admin',$route);
return $router;
}
Thanks all,
You didn’t specify the :controller parameter in the route.
Try it like that:
Also you can achieve the same effect with application.ini configuration:
Other application.ini tips and tricks here