Symfony2 / A meaning of routing prefixes

Prefixing Imported Routes
You can also choose to provide a "prefix" for the imported routes. For example, suppose you want the acme_hello route to have a final pattern of /admin/hello/{name} instead of simply /hello/{name}:


# app/config/routing.yml

acme_hello:
  resource: "@AcmeHelloBundle/Resources/config/routing.yml"
  prefix: /admin

The string /admin will now be prepended to the pattern of each route loaded from the new routing resource.

More info about routing and prefixes can be found here: Symfony2 Routing

No comments:

Post a Comment