.htaccess redirect from http to https and from non-www to www redirect – Make site permanently SSL secured

put this in your htaccess file:

RewriteCond %{HTTP_HOST} !^www\.(.*)
RewriteRule (.*) https://www.%{HTTP_HOST}/\ [R=301,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *