Zend Framework routes.ini有多个路由,但模块/控制器/动作目的地相同?

时间:2011-01-05 22:38:15

标签: zend-framework routes zend-route

我的Zend Framework PHP应用程序的以下routes.ini配置文件出现问题。我想使用自己创建的静态网址。我不想使用某些类型的语言/路线! (SEO要求)。我该怎么做这种路由?

[routes]

;default
routes.businessregistration_fieldautovalidation.type = "Zend_Controller_Router_Route_Static"
routes.businessregistration_fieldautovalidation.route = "/business/registration/fieldautovalidation"
routes.businessregistration_fieldautovalidation.defaults.module = "businessregistration"
routes.businessregistration_fieldautovalidation.defaults.controller = "businessregistration"
routes.businessregistration_fieldautovalidation.defaults.action = "fieldautovalidation"

;de

routes.businessregistration_businessregistration_de.type = "Zend_Controller_Router_Route_Static"
routes.businessregistration_businessregistration_de.route = "/unternehmen/registrierung"
routes.businessregistration_businessregistration_de.defaults.module = "businessregistration"
routes.businessregistration_businessregistration_de.defaults.controller = "businessregistration"
routes.businessregistration_businessregistration_de.defaults.action = "index"
routes.businessregistration_businessregistration_en.defaults.locale = "de_DE"

;en

routes.businessregistration_businessregistration_en.type = "Zend_Controller_Router_Route_Static"
routes.businessregistration_businessregistration_en.route = "/business/registration"
routes.businessregistration_businessregistration_en.defaults.module = "businessregistration"
routes.businessregistration_businessregistration_en.defaults.controller = "businessregistration"
routes.businessregistration_businessregistration_en.defaults.action = "index"
routes.businessregistration_businessregistration_en.defaults.locale = "en_US"

问题是只有第一个路由(“de”)被zend路由器引擎初始化。 Zend Router忽略以下英文路线。是否有任何限制,我只能使用一条路线到一个目的地?为什么呢?

非常感谢,

斯蒂芬

1 个答案:

答案 0 :(得分:2)

解决。遗憾!

问题:routes.businessregistration_businessregistration_ zh_ .defaults.locale =“de_DE”