Correct http to https redirection

Signed-off-by: Florent Le Saout <florent.lesaout@astrolabe.coop>
This commit is contained in:
Florent Le Saout 2020-07-28 23:04:51 +02:00
parent b95cc0aa71
commit c4f48fab95

View File

@ -1,4 +1,12 @@
RewriteEngine On # Prevent viewing of htaccess file.
RewriteCond %{SERVER_PORT} 80 <Files .htaccess>
RewriteRule ^(.*)$ https://www.astrolabe.coop/$1 [R,L] order allow,deny
deny from all
</Files>
# Prevent directory listings
Options All -Indexes
ErrorDocument 404 /404.html ErrorDocument 404 /404.html
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https [OR]
RewriteCond %{HTTP_HOST} ^astrolabe\.coop [NC]
RewriteRule ^ https://www.astrolabe.coop%{REQUEST_URI} [L,NE,R=301]