I have a domain I which I am using the following simple code.
- Code: Select all
RewriteCond %{http_host} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
But I would like my subdomains to be rewritten without the www.
For example: www.sub.domain.com would be re written to sub.domain.com but domain.com would be re written to www.domain.com.
Any help appreciated.
John