In .htaccess
it I have two subdomains configured that point to different folders.
###ACB DVA
RewriteCond %{HTTP_HOST} acb-dva\.demo\.net$ [NC]
RewriteCond %{REQUEST_URI} !^/dva_demo/ [NC]
RewriteRule (.*)$ /dva_demo/$1 [L]
Y
### DVA
RewriteCond %{HTTP_HOST} dva\.demo\.net$ [NC]
RewriteCond %{REQUEST_URI} !^/dva/ [NC]
RewriteRule (.*)$ /dva/$1 [L]
When trying to get into acb-dva.demo.net I get error 500. If I comment out the dva.demo.net it works fine.
How could you differentiate the sub-domains?
Thanks.
Try changing the following directive:
For the following:
And this directive:
For this:
Depending on how you have the regex
dva.demo.net
, it conflicts with both configurations. By adding^
at the beginning you force it to always start with the domain.