phpzend-frameworkmodulerouteszend-controller-router

Add a prefix for the default route of Zend_Controller_Router_Route_Module


I would like to know if it is possible to change the default route of :module/:controller/:action/* to something like /my/prefix/:module/:controller/:action/*, keeping the possibility to not specify a module and/or controller and/or action.


Solution

  • You can set baseUrl in application.ini

    resources.frontController.baseUrl = "my/prefix/"
    

    and you can ofcourse not specify module/controller/view but it will be default one = default/index/index unless you set up different default module/controller/view.