Reputation: 7994
If i have a url such as this http://example.com/controller/action
every thing works find. as expected. However i need to deploy this and in deployment things change a bit to htttp://deploy.com/stuff/pile/controller/action
is there any way i can control this in zend.
Thanks in advance.
Upvotes: 1
Views: 70
Reputation: 21957
Add this route to your Bootstrap:
protected function _initRoute() {
$front = Zend_Controller_Front::getInstance();
$router = $front->getRouter();
$router->addRoute(
'prefix_route',
new Zend_Controller_Router_Route('stuff/pile/:controller/:action',
array('controller' => $front->getRequest()->getControllerName(),
'action' => $front->getRequest()->getActionName())));
);
}
Upvotes: 1