0

我的 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 路由器。感谢阅读

4

1 回答 1

0

尝试对您的文件进行 Zend 路由Bootstrap.php作为替代方案。

这是有关如何执行此操作的教程:

http://www.codexperience.co.za/post/hiding-url-parameters-names-using-zend-routers

于 2013-08-02T15:23:51.903 回答