Created
June 6, 2016 08:01
-
-
Save zetrider/0fa5e608f4cc7ce15219d8f050c6e387 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
Options +FollowSymLinks | |
RewriteEngine On | |
# Редирект с www на без www | |
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] | |
# Удаляем index.php из адреса | |
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] | |
# Не применяем к админке, иначе перестает работать страница Highload-блоки | |
RewriteCond %{REQUEST_URI} !/bitrix/admin/.* [NC] | |
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-l | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$ | |
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L] | |
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment