RewriteEngine On RewriteCond %{HTTPS} !on #RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L] RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Header set Strict-Transport-Security "max-age=604800; includeSubDomains" env=HTTPS