I'm currently setting up symfony2 on a remote server that we'll call www.domain.com.
I want all my user that call the address www.domain.com to be redirected to www.domain.com/app.php, so I wrote a RewriteRule, and it's working fine.
Now I still want our developers to access the app_dev.php on the domain www.domain.com, so I created the following subdomain : www.dev.domain.com that has a specific RewriteRule to redirect to app_dev.php
My setup is working fine, but it look like kind of hacky so I was wondering if there's a better way to achieve that ?
Here's my RewriteRules :
RewriteCond %{HTTP_HOST} ^(domain.com|www.domain.com)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ web/app.php [QSA,L]
RewriteCond %{HTTP_HOST} ^(www.dev.domain.com|dev.domain.com)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ web/app_dev.php [QSA,L]
Thanks !