I'm having trouble getting the Zend_Controller_Router_Route_Hostname
to work properly.
I'm using Zend Framework 1.9.4
In my config I have:
resources.router.routes.www.type = "Zend_Controller_Router_Route_Hostname"
resources.router.routes.www.route = ":module.domain"
resources.router.routes.www.defaults.module = "frontend"
resources.router.routes.www.chains.index.type = "Zend_Controller_Router_Route"
resources.router.routes.www.chains.index.route = ":controller/:action/*"
resources.router.routes.www.chains.index.defaults.controller = "index"
resources.router.routes.www.chains.index.defaults.action = "index"
At first look it seems to work just fine. I have two modules:
services.domain
admin.domain
and the default module frontend, answers to everything else that does not exist.
I can access services.domain/mycontroller/myaction/
and i get the right controller and action, from the right module.
But here comes my problem: I can't specify parameters. F.x if i go to:
services.domain/mycontroller/myaction/key1/value1/key2/value2
I will get an invalid controller exception, because it then tries to find mycontroller in the frontend module - not the services module.
I tried messing around with the Zend_Controller_Router_Route
and tell it to recieve a specific param - this works just fine, however i just want to be able to have all params dynamiclly like the default setup.
What's wrong with my setup?