Symfony 2.1.4 - 使用parameters.yml进行动态路由

时间:2013-01-02 10:42:47

标签: dynamic symfony symfony-2.1 routes

我有这个错误

  

找不到“GET / sn /”

的路线

和this .. in parameters.yml

parameters:  
[...]  
    client_abv:         sn

我的routing.yml文件:

_internal:  
  resource: "@FrameworkBundle/Resources/config/routing/internal.xml"
  prefix: /_internal

ClientResultBundle_Admin:
    resource: "@ClientResultBundle/Resources/config/routing/admin.yml"
    prefix: /%client_abv%/admin

ClientResultBundle_PointDeVente:
    resource: "@ClientResultBundle/Resources/config/routing/pointdevente.yml"
    prefix: /%client_abv%/pointdevente

ClientResultBundle_Sn:
    resource: "@ClientResultBundle/Resources/config/routing/sn.yml"
    prefix:   /%client_abv%

ClientResultBundle:
    resource: "@ClientResultBundle/Resources/config/routing.yml"
    prefix:   /%client_abv%

那么为什么命令控制台route:match /sn/可以工作而不能在浏览器中工作?

1 个答案:

答案 0 :(得分:0)

摆脱结尾斜线 - 指向/sn