I hope you understand I'm only trying to keep thing a clear as possible for everybody here, which of course goes along with a bit of cooperation with our dear community.
Anyway, while we're at, here is how you should proceed :
Add this in your .htaccess, right after the rewritebase line :
- Code: Select all
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^(.*) http://www.example.com/$1 [QSA,L,R=301]
And just replace example\.com with the domain you want to use in the end.
All other domain leading in the same folder on the server will be redirected, anything but -www.example.com will be redirected, meaning example.com as well, which the dupe almost everybody has to deal with, the www prefix one.
If you read the www prefix thread a bit, you'll see that it's possible that this syntax will not exactly be the one working on your server, you may need to get rid of the trailing $ at the end of the RewriteCond for example, but that's how we redirect all at once easily.
++

English |
French

