I have the following generic routing on my symfony project as in (routing.yml):
appsite2:
path: /{req}/{var}
defaults: {_controller: AppBundle:Default:index}
However, it overwrites the routing api/doc
as:
NelmioApiDocBundle:
resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
prefix: /api/doc
So how can I change the first routing and put exception for {var}
, something like: if({req}/{var} != '/api/doc')
?
Note: I already tried to change the order of the 2 routes and it doesn't work.