开发者

Chain several routes in zend framework

开发者 https://www.devze.com 2023-02-17 09:12 出处:网络
How can I get these 2 routes (languages, amdin) to work.. alone admin, or language will work but together they will fail :(

How can I get these 2 routes (languages, amdin) to work.. alone admin, or language will work but together they will fail :(

; Admin route
resources.router.routes.admin.type = Zend_Controller_Router_Route
resources.router.routes.admin.route = ":admin"
resources.router.routes.admin.reqs.admin = "admin"

; Language route
resources.router.routes.language.type = Zend_Controller_Router_Route
resources.router.routes.language.route = ":language"
resources.router.routes.language.reqs.language = "^(nl|en)$"
resources.router.routes.language.defaults.language = "nl"

; Default route chain
resources.router.routes.default.type = Zend_Controller_Router_Route_Chain
reso开发者_如何学运维urces.router.routes.default.chain = "language, admin, defaultmodule"


Well, of course. These routes are overlapping, while they should have been different.

; Admin route
...
resources.router.routes.admin.route = "admin/:admin"
...
0

精彩评论

暂无评论...
验证码 换一张
取 消