how to redirect www subdomain to non-www when domain is redirected to www
My primary domain is currently permanently redirected to www.mydomain.com (non-www to www redirection), with .htaccess as follows: RewriteCond %{HTTP_HOST} ^mydomain.com$ RewriteRule ^/?$ "http\:\/\/www\.mydomain\.com\/" [R=301,L] RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://mydomain.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com$ [NC] I would like to know how all subdomains that I'll be creating, ex. blog.mydomain.com, will be redirected to non-www, ex. blog