mardi 19 avril 2016

How to enforce https and www in .htaccess

I am trying to enforce https and www for my domain but it doesn't work for all the cases.

  RewriteCond %{ENV:HTTPS} !=On [OR]
  RewriteCond %{HTTP_HOST} !^(www\.)(.*) [NC]
  RewriteRule (.*) http://ift.tt/1sPJHUD [R=301,L]

Please let me know if am missing anything in my code.




Aucun commentaire:

Enregistrer un commentaire