-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Following http://symfony.com/doc/master/components/routing/hostname_pattern.html
Adding a Host Regex to Imported Routes¶
You can set a host regex on imported routes:
# app/config/routing.yml
acme_hello:
resource: "@AcmeHelloBundle/Resources/config/routing.yml"
host: "hello.example.com"
The host hello.example.com will be set on each route loaded from the new routing resource.
Trying this with:
acme_hello:
resource: "@AcmeHelloBundle/Resources/config/routing.yml"
host: "/.domain.com|domain.com/"
Fails to match www.domain.com and domain.com, and any other combination.
Debug:
preg_match('/.domain.com |domain.com /', 'www.domain.com', $result);
var_dump($result)
array (size=1)
0 => string '.domain.com'
Does symfony use something else than preg_match internally or am i missing something ?
Metadata
Metadata
Assignees
Labels
No labels