Regex zend router ini文件在规则中添加正则表达式异常

Regex zend router ini文件在规则中添加正则表达式异常,regex,zend-framework,routes,Regex,Zend Framework,Routes,我有三个路由器,如下所示。我想给第一个路由器添加一个例外,这样它就不会处理另外两个路由器。我试图在第一个路由器中添加异常状态,但没有成功。 routes.frontindex.route=“/?([a-zA-Z0-9_-]+)!链接!模板?/?([a-zA-Z0-9_-]+)” 知道我错在哪里吗 ; frontindex routes starts here routes.frontindex.type = "Zend_Controller_Router_Route_Regex" routes.

我有三个路由器,如下所示。我想给第一个路由器添加一个例外,这样它就不会处理另外两个路由器。我试图在第一个路由器中添加异常状态,但没有成功。
routes.frontindex.route=“/?([a-zA-Z0-9_-]+)!链接!模板?/?([a-zA-Z0-9_-]+)”

知道我错在哪里吗

; frontindex routes starts here
routes.frontindex.type = "Zend_Controller_Router_Route_Regex"
routes.frontindex.route = "/?([a-zA-Z0-9_-]+)?/?([a-zA-Z0-9_-]+)?"
routes.frontindex.defaults.module = frontManagement
routes.frontindex.defaults.controller = Index
routes.frontindex.map.page = 1
routes.frontindex.map.siteid = 2
; frontindex routes stops here


; templateStyles routes starts here
routes.templatestyle2.type = "Zend_Controller_Router_Route_Regex"
routes.templatestyle2.route = "template/templatestyle/(add|test)/?([a-zA-Z0-9_-]+)?/?([a-zA-Z0-9_-]+)?"
;routes.templatestyle2.defaults.module = templateManagement
;routes.templatestyle2.defaults.controller = Template-style
;routes.templatestyle2.map.action = 1
;routes.templatestyle2.map.key = 2
;routes.templatestyle2.map.id = 2
; templateStyles routes stops here

; link routes starts here
    routes.link.type = "Zend_Controller_Router_Route_Regex"
    routes.link.route = "link/link/(add|test)/?([a-zA-Z0-9_-]+)?/?([a-zA-Z0-9_-]+)?"
    ;routes.link.defaults.module = linkManagement
    ;routes.link.defaults.controller = link-style
    ;routes.link.map.action = 1
    ;routes.link.map.key = 2
    ;routes.link.map.id = 2
    ; linkroutes stops here
试着这样做:

  • 首先添加一个cath all默认路由,它是一个Zend\u控制器\u路由器\u路由,而不是Zend\u控制器\u路由器\u路由。在此路由上添加一个带有regexp的,该regexp将排除其他路由的匹配案例
在.ini文件中,语法为:

routes.frontindex.reqs.something="my-regexp-catching-valid-case-for-this-default-not-regexp-route"

我不理解上面的任何内容。你能解释一下这将如何适合我的上述代码吗?在第1条路线(不应该是regexp路线)中,将路线变量中的第一个单词(“模板”、“链接”或“某物”)映射,并在该单词上添加一个要求(而不是“模板”或“链接”),请参见要求链接。