How can I point a subdomain to a specific bundle. I have this vhost
:
<VirtualHost *:80>
ServerName subdomain1.mysite.dev
ServerAlias subdomain2.mysite.dev
DocumentRoot /mysite/web
<Directory /mysite/web>
AllowOverride All
Order allow,deny
Allow from All
</Directory>
</VirtualHost>
This /etc/hosts
:
127.0.0.1 subdomain1.mysite.dev subdomain2.mysite.dev
And this app/routing.yml
:
subdomain1:
resource: "@ProjectSubdomain1Bundle/Resources/config/routing.yml"
host: subdomain1.mysite.dev
subdomain2:
resource: "@ProjectSubdomain2Bundle/Resources/config/routing.yml"
host: subdomain2.mysite.dev
This way both subdomains goes to Subdomain1Bundle
.
Sorry, I'm shamed. I just needed to clean the production cache:
app/console --env=prod cache:clear
Because I was developing before with server:run
mode. Anyway I will keep the above example because it works perfectly.