Reputation: 3247
I have the following RewritRule in my .htaccess
what causes a problem for further actions:
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Now I would like to create a subdomain like folder.example.com
The problem is that when calling this domain it automatically will be added www.
before folder
so that it will be www.folder...
because of that ReWriteRule. So my question is how can I exclude just that folder
from that condition?
Thanks alot.
Upvotes: 0
Views: 46
Reputation: 3435
You need to add a rewrite condition excluding the subdomain from your rewrite rule.
RewriteCond %{HTTP_HOST} !^folder\.example\.com$
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Upvotes: 1