这是我当前的路线
routes.index.route = "/:lang/:controller/:action*"
routes.index.defaults.controller = index
routes.index.defaults.action = index
routes.index.defaults.lang = en
但它不起作用,我需要/:lang/:controller/:action
这样的东西,有人能帮我吗?谢谢
您的语法看起来有点稀疏尝试:
resources.router.routes.index.route = "/:lang/:controller/:action*"
resources.router.routes.index.defaults.module = default
resources.router.routes.index.defaults.controller = index
resources.router.routes.index.defaults.action = index
resources.router.routes.index.defaults.lang = en
您还需要定义模块,即使它只是"默认"(读取无模块)模块。