From be02a25c2d198532218241eca1eca45003d7f6de Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 8 Jun 2016 19:25:11 +0300 Subject: [PATCH] htacess www --- .htaccess | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index fce9bff..78c62ba 100644 --- a/.htaccess +++ b/.htaccess @@ -61,6 +61,7 @@ AddDefaultCharset utf-8 RewriteRule ^fonts/(.*)$ frontend/web/fonts/$1 [L] + RewriteCond %{REQUEST_URI} !^/(frontend|backend)/web/(assets|css|js|images|fonts|img|files)/ RewriteCond %{REQUEST_URI} !index.php @@ -69,7 +70,20 @@ AddDefaultCharset utf-8 RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^.*$ frontend/web/index.php [L] + RewriteCond %{HTTP_HOST} ^www\.(.*) + RewriteRule ^(.*)$ frontend/web/index.php [L] + + RewriteCond %{HTTP_HOST} ^([^www].*)$ + RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + + + + + + + +# RewriteCond %{HTTP_HOST} ^([^www].*)$ +# RewriteRule ^(.*)$ http://www.%1/$1 [R=301] -- libgit2 0.21.4