Auto https fixup

This commit is contained in:
Vojtěch Sajdl 2018-01-30 18:13:01 +01:00
parent fcd1b87d7f
commit 6261dcfc9e
No known key found for this signature in database
GPG Key ID: 5D4EB1361A272390
1 changed files with 5 additions and 5 deletions

View File

@ -8,10 +8,10 @@ ErrorDocument 404 /404.php
</IfModule>
<IfModule mod_rewrite.c>
#DELETE THIS IF YOU DON'T HAVE HTTPS!
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>