Answer the question
In order to leave comments, you need to log in
Why Symfony 2 doesn't process regex in router/route?
There is a regular expression that should mean "everything except admin and api":
^(?!.*(admin|api)$).*
# routing.yml
homepage:
path: /
host: "{slug}.site.ru"
defaults:
_controller: AcmeDemoBundle:Main:homepage
requirements:
slug: ^(?!.*(admin|api)$).*
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question