jeudi 28 janvier 2016

htaccess redirecting working except for the root

I have an htaccess redirect (forcing www) set for my website and it works perfectly except when I go to mydomain.com it doesn't redirect to www.mydomain.com

It works for every other page except for the root one. For example if I go to http://ift.tt/1SMKrIM it will redirect me to http://ift.tt/1PWpZz6

I have tried a ton of different options I could find online and none of them seem to work.

This is the current version I use:

RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.domain-name\.com$ [NC]
RewriteRule ^(.*)$ http://ift.tt/1xCuxqV [R=301,L]




Aucun commentaire:

Enregistrer un commentaire