Le 02/03/11 21:39, nebiros a écrit :
Hey,

I was reading a devzone post: http://devzone.zend.com/article/12381 and
somebody post a comment about how to prepend something to the default
routes, in your case the account, in my case the region, so I wrote this in
my application.ini file:

resources.router.routes.module.type = "Zend_Controller_Router_Route_Module"
resources.router.routes.region.type = "Zend_Controller_Router_Route"
resources.router.routes.region.route = ":region"
resources.router.routes.region.reqs.region = "[a-z]{2}"
resources.router.routes.region.abstract = 1
resources.router.routes.default.type = "Zend_Controller_Router_Route_Chain"
resources.router.routes.default.chain = "region, module"

So all urls look this way: /:region/:module/:controller/:action

Maybe this can help you.

--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/adding-a-REST-route-chained-with-another-route-tp3297415p3332254.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Hi nebiros,

Correct me if I am wrong but your configuration file shows how to chain a Zend_Controller_Router_Route to a Zend_Controller_Router_Route_Module.

The problem I describe is that the :region variable will be removed from the request if you have two subsequent routes to test and the first one doesn't match.

Regards
--
Guillaume

Reply via email to