zend framework - Hide only the default controller name from the URL -
zend framework - Hide only the default controller name from the URL -
is possible forcefulness zend_router check defaultcontroller it's actions, , skip controller name in url, if action in default controller ?
ie. /defaultcontrollername/action/ -> /action/ /nondefaultcontorller/action/ -> /nondefaultcontorller/action/
if it's impossible what's convention handle situation ?
static routes can accomplish you'd have add together 1 each of actions in index controller.
so mysite.com/add go index controller add together action.
protected function _initroutes() { $frontcontroller = zend_controller_front::getinstance(); $router = $frontcontroller->getrouter(); $route = new zend_controller_router_route_static('add', array('controller'=>'index','action'=>'add')); $router->addroute('add',$route); }
zend-framework zend-route
Comments
Post a Comment