I have tried searching but for some reason cant seem to find a post that has this question answered - hopefully I didn't accidentally skip by one.
Basically I am trying to get code for the .htaccess file that will do the following.
301 redirect ALL sub domain requests that have the WWW to that without the WWW.
For instance, if someone tries to access:
http://www.subdomain.topleveldomain.com/* I want it to 301 to
http://subdomain.topleveldomain.com/*
The site this is for has dozens and dozens of sub domains, so if there is code that would work using a wildcard for the sub domain, that would be ideal.
I actually am looking for this info to help out someone else. Here is a snippet he asked me to add to this post. This is what he has done, thus far, and it does not work yet.
Basically what this is saying is:
1. If the url is not www.demo.com*
2. If the url is not empty
3. If the url MATCHES www.*.demo.com
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
You have not yet logged in, or registered properly as a member
You are a member, but no longer have posting rights.
This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.