【发布时间】:2014-03-30 14:55:59
【问题描述】:
当我使用这个配置时:
#/app/config/routing.yml
_org_demo:
resource: "@OrgDemoBundle/config/routing.yml"
#Org/DemoBundle/config/routing.yml
_home:
path: /{name}
defaults: { _controller: OrgDemoBundle:Home:index, name: world}
/ 和 /xyz 都可以正常加载。
但是,当我使用新配置时
#/app/config/routing.yml
_org_demo:
resource: "@OrgDemoBundle/config/routing.yml"
prefix: /hello
#Org/DemoBundle/config/routing.yml
_home:
path: /{name}
defaults: { _controller: OrgDemoBundle:Home:index, name: world}
在这种情况下/hello/xyz 加载但不是/hello/,我收到错误No route found for "GET /hello/"。为什么/hello/ 在这种情况下无法加载,我该如何解决?
【问题讨论】: