Browse Source

htaccess fixe

Bachir Soussi Chiadmi 8 years ago
parent
commit
3027b3985b
1 changed files with 8 additions and 5 deletions
  1. 8 5
      .htaccess

+ 8 - 5
.htaccess

@@ -56,6 +56,14 @@ DirectoryIndex index.php index.html index.htm
 <IfModule mod_rewrite.c>
   RewriteEngine on
 
+  # SSL
+  # RewriteCond %{HTTPS} off [OR]
+  # 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]
+
   # 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
   # you don't bounce between http and https.
@@ -129,11 +137,6 @@ DirectoryIndex index.php index.html index.htm
   # RewriteCond %{HTTP_HOST} ^materio\.eu
   # RewriteRule ^ http://www.materio.com%{REQUEST_URI} [L,R=301]
 
-  # SSL
-  # RewriteCond %{HTTPS} off [OR]
-  # RewriteCond %{HTTP_HOST} ^materio\.com*
-  # RewriteRule ^(.*)$ https://www.materio.com/$1 [L,R=301]
-
 
   # Rules to correctly serve gzip compressed CSS and JS files.
   # Requires both mod_rewrite and mod_headers to be enabled.