I have several websites that I use a subdomain as part of the main url.
subdomain.domain.com
When someone enters www.subdomain.domain.com they get an error, I want to redirect that to subdomain.domain.com.
Thanks in advance!
I have several websites that I use a subdomain as part of the main url.
subdomain.domain.com
When someone enters www.subdomain.domain.com they get an error, I want to redirect that to subdomain.domain.com.
Thanks in advance!
Assuming you have mod_rewrite
enabled:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteRule .* http://%1%{REQUEST_URI} [L]