From b9a8db814055e1ce551b92503d8a3ef322461bd2 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Tue, 24 Nov 2015 13:08:22 +0100 Subject: [PATCH] htaccess fixe --- .htaccess | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.htaccess b/.htaccess index 6ac2e374..5308d0f1 100755 --- a/.htaccess +++ b/.htaccess @@ -61,8 +61,11 @@ DirectoryIndex index.php index.html index.htm # RewriteCond %{HTTP_HOST} ^www.materio\.com* # RewriteRule ^(.*)$ https://materio.com/$1 [L,R=301] - # RewriteCond %{HTTPS} off - # RewriteRule ^(.*)$ https://www.materio.com/$1 [L,R=301] + # Redirect to HTTPS + RewriteCond %{HTTPS} off + RewriteCond %{HTTP:X-Forwarded-Proto} !https + RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + # Set "protossl" to "s" if we were accessed via https://. This is used later # if you enable "www." stripping or enforcement, in order to ensure that