Commit be02a25c2d198532218241eca1eca45003d7f6de

Authored by Dmytry Fedorchuk
1 parent 8fe601f0

htacess www

Showing 1 changed file with 15 additions and 1 deletions   Show diff stats
.htaccess
... ... @@ -61,6 +61,7 @@ AddDefaultCharset utf-8
61 61  
62 62 RewriteRule ^fonts/(.*)$ frontend/web/fonts/$1 [L]
63 63  
  64 +
64 65 RewriteCond %{REQUEST_URI} !^/(frontend|backend)/web/(assets|css|js|images|fonts|img|files)/
65 66  
66 67 RewriteCond %{REQUEST_URI} !index.php
... ... @@ -69,7 +70,20 @@ AddDefaultCharset utf-8
69 70  
70 71 RewriteCond %{REQUEST_FILENAME} !-d
71 72  
72   - RewriteRule ^.*$ frontend/web/index.php [L]
  73 + RewriteCond %{HTTP_HOST} ^www\.(.*)
  74 + RewriteRule ^(.*)$ frontend/web/index.php [L]
  75 +
  76 + RewriteCond %{HTTP_HOST} ^([^www].*)$
  77 + RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  78 +
  79 +
  80 +
  81 +
  82 +
  83 +
  84 +
  85 +# RewriteCond %{HTTP_HOST} ^([^www].*)$
  86 +# RewriteRule ^(.*)$ http://www.%1/$1 [R=301]
73 87  
74 88 </IfModule>
75 89  
... ...