From 6aeeeb22caae5bfa88c236c78d5796a0b26e7cf1 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Tue, 27 Aug 2024 10:40:59 +0200 Subject: [PATCH] force https --- .htaccess | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..21ffa4e --- /dev/null +++ b/.htaccess @@ -0,0 +1,12 @@ +RewriteEngine on + +# Redirection du www vers non-www en HTTPS +RewriteCond %{HTTP_HOST} ^www\.(.+) [NC] +RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301] + +# Redirection vers HTTPS +RewriteCond %{HTTPS} off +RewriteCond %{HTTP:X-Forwarded-Proto} !https +RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + +# See https://ouvaton.coop/certificat-ssl/ \ No newline at end of file