First time poster here and Im a bit of a newbie when it comes to mod_rewrite
I am having a problem with one of my sites and I have my .htaccess set up like this
RewriteCond %{HTTP_HOST} !^www\.site\.com$ [NC]RewriteRule ^(.*)$ http://www.site.com/$1 [R=301,L]
now when i create a subdomain instead of the url structure being subdomain.site.com it redirects to site.com/subdomain ?
I know that the rule is saying to redirect if the hostname is not www.site.com which subdomains will trigger the rules and get redirected.
its just i dont have a clue on how to fix this..
at the moment i have set up a .htacces file with mod_rewrite off on the subdomain. But for seo reasons i need it turned on..
Hope i am making sense and I appreciate your help
![:)](./images/smilies/icon_smile.gif)
Regards
Waza