0

我正在声明这样的路线:

配置.yml

vw_front:
    resource: "@VWFrontBundle/Resources/config/routing.yml"
    prefix:   /{_locale}
    defaults: { _locale: "%locale%" }
    requirements:
        _locale: "%locales%"

@VWFrontBundle/Resources/config/routing.yml

vw_front_homepage:
    pattern:  /
    defaults: { _controller: "VWFrontBundle:FrontIndex:index" }

不幸的是,当我去时,app_dev.php我得到:

No route found for "GET /" 

它正在与app_dev.php/en

我应该在所有路由模式中重复/{_locale},因为不支持前缀中的占位符吗?听起来很脏:S

4

0 回答 0