Browse Source

htaccess fixe

Bachir Soussi Chiadmi 8 years ago
parent
commit
26ab9aa56b
1 changed files with 13 additions and 16 deletions
  1. 13 16
      .htaccess

+ 13 - 16
.htaccess

@@ -67,6 +67,19 @@ DirectoryIndex index.php index.html index.htm
   # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
 
+  # CUSTOMS
+  # redirect all materiau domains to materio.com
+  RewriteCond %{HTTPS} off
+  RewriteCond %{HTTP_HOST} ^basebeta\.materio\.com [OR]
+  RewriteCond %{HTTP_HOST} ^materio\.com [OR]
+  RewriteCond %{HTTP_HOST} ^www\.materio\.fr [OR]
+  RewriteCond %{HTTP_HOST} ^materio\.fr [OR]
+  RewriteCond %{HTTP_HOST} ^www\.materio\.net [OR]
+  RewriteCond %{HTTP_HOST} ^materio\.net [OR]
+  RewriteCond %{HTTP_HOST} ^www\.materio\.eu [OR]
+  RewriteCond %{HTTP_HOST} ^materio\.eu
+  RewriteRule ^ http://www.materio.com%{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
   # you don't bounce between http and https.
@@ -100,11 +113,9 @@ DirectoryIndex index.php index.html index.htm
   # To redirect all users to access the site WITH the 'www.' prefix,
   # (http://example.com/... will be redirected to http://www.example.com/...)
   # uncomment the following:
-  # RewriteCond %{HTTPS} off [OR]
   RewriteCond %{HTTP_HOST} .
   RewriteCond %{HTTP_HOST} !^www\. [NC]
   RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
-  # RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
   # To redirect all users to access the site WITHOUT the 'www.' prefix,
   # (http://www.example.com/... will be redirected to http://example.com/...)
@@ -129,20 +140,6 @@ DirectoryIndex index.php index.html index.htm
   RewriteCond %{REQUEST_URI} !=/favicon.ico
   RewriteRule ^ index.php [L]
 
-  # CUSTOMS
-  # redirect all materiau domains to materio.com
-  # RewriteCond %{HTTPS} off
-  # RewriteCond %{HTTP_HOST} ^basebeta\.materio\.com [OR]
-  # RewriteCond %{HTTP_HOST} ^materio\.com [OR]
-  # RewriteCond %{HTTP_HOST} ^www\.materio\.fr [OR]
-  # RewriteCond %{HTTP_HOST} ^materio\.fr [OR]
-  # RewriteCond %{HTTP_HOST} ^www\.materio\.net [OR]
-  # RewriteCond %{HTTP_HOST} ^materio\.net [OR]
-  # RewriteCond %{HTTP_HOST} ^www\.materio\.eu [OR]
-  # RewriteCond %{HTTP_HOST} ^materio\.eu
-  # RewriteRule ^ http://www.materio.com%{REQUEST_URI} [L,R=301]
-
-
   # Rules to correctly serve gzip compressed CSS and JS files.
   # Requires both mod_rewrite and mod_headers to be enabled.
   <IfModule mod_headers.c>