-2
To access http://taobao.com/index/index/cityid/1 point http://taobao.com/Alaska 
To access http://taobao.com/index/index/cityid/2 point http://taobao.com/Houston
To access http://taobao.com/index/index/cityid/3 point http://taobao.com/NewYork
To access http://taobao.com/index/index/cityid/3 point http://taobao.com/LosAngeles

.......近100个城市。route.ini 其中写

[production]
routes.rating.type = "Zend_Controller_Router_Route"
routes.BeiJing.route = "BeiJing"
routes.BeiJing.defaults.controller = "index"
routes.BeiJing.defaults.action = "index"

如何实现?

4

1 回答 1

0

Zend Framework 手册的这一部分应该为您指明正确的方向。

示例路线可能如下所示:

routes.alaska.route = "阿拉斯加"
routes.alaska.defaults.controller = index
routes.alaska.defaults.action = index
routes.alaska.defaults.cityid = 1

不过,这个解决方案非常有限制——也许如果你能详细说明你想要实现的目标,我自己或我在这里的其他贡献者可能能够提供更好的解决方案?

于 2012-08-01T16:17:03.130 回答