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