路由设置时遇到问题


Trouble routing settings

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个城市。路由.ini写

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

如何实现?

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

示例路由可能如下所示:

routes.alaska.route = "Alaska">
routes.alaska.defaults.controller = index
routes.alaska.defaults.action = index
routes.alaska.defaults.cityid = 1

不过,这个解决方案非常严格 - 也许如果你能详细说明你想要实现的目标,我或我在这里的贡献者可能会提供更好的解决方案?