我的 url 是http://mysite.com/index/bytype/id/5/name/ACTION
使用 zend 路由器时,它将被重写为http://mysite.com/index/bytype/5.ACTION.html
我在文件 router.ini 中的配置,如下所示:
routes.bytype.type = "Zend_Controller_Router_Route_Regex"
routes.bytype.route = "bytype/(\d+).(.*).html"
routes.bytype.defaults.module = "default"
routes.bytype.defaults.controller = "index"
routes.bytype.defaults.action = "bytype"
routes.bytype.map.1 = "id"
routes.bytype.map.2 = "name"
routes.bytype.map.3 = "page"
routes.bytype.reverse = "bytype/%d.%s.html"
上面的代码在我单击下一页按钮时出现问题,它不会跳转到下一页,导致参数 page/2 不可用,zend 路由器被重写我的 urlhttp://mysite.com/index/bytype/5.ACTION.html
再次变为,
如果不重写它可能看起来像http://mysite.com/index/bytype/id/5/name/ACTION/page/2
这样我怎么能包括“页面" 参数到上面的 url 与 zend 路由器。感谢阅读