When user is visiting by www.domain.name, redirect to domain.name.
When user is visiting by www.domain.name , redirect to domain.name .
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Put this in an
.htaccessfile in your root directory of your website:This is what they do, in order:
HTTP_HOSTwas providedwwwor any other sub domain, then allow the rewrite to continue. This prevents an endless redirect back to itself.(.*), including the querystringQSA, and redirectR=301to the correct domain. TheLjust says this is the last command in the file if a match is found.