Options -Indexes
ErrorDocument 404 /404.php
<IfModule mod_php5.c>
php_flag session.use_trans_sid off
#php_flag default_charset UTF-8
#php_value display_errors 1
</IfModule>
<IfModule mod_php7.c>
php_flag session.use_trans_sid off
#php_flag default_charset UTF-8
#php_value display_errors 1
</IfModule>
<IfModule mod_dir.c>
DirectorySlash Off
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
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}]
RewriteCond %{REQUEST_URI} ^.*[^/]$
#RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}/index.php -f
#RewriteRule ^(.*)$ /$1/index.php [L]
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} /food/
RewriteRule ^food/$ /food [R=301,L]
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php index.html
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/jpeg "access plus 3 day"
ExpiresByType image/gif "access plus 3 day"
ExpiresByType image/png "access plus 3 day"
ExpiresByType text/css "access plus 3 day"
ExpiresByType application/javascript "access plus 3 day"
</IfModule>
RewriteCond %{HTTP_HOST} ^www.site.ru$ [NC]
RewriteRule (.*) http://site.ru/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
$arUrlRewrite=array (
3 =>
array (
'CONDITION' => '#^/bitrix/services/ymarket/#',
'RULE' => '',
'ID' => '',
'PATH' => '/bitrix/services/ymarket/index.php',
'SORT' => 100,
),
4 =>
array (
'CONDITION' => '#^/company/partners/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/company/partners/index.php',
'SORT' => 100,
),
5 =>
array (
'CONDITION' => '#^/company/licenses/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/company/licenses/index.php',
'SORT' => 100,
),
6 =>
array (
'CONDITION' => '#^/company/vacancy/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/company/vacancy/index.php',
'SORT' => 100,
),
7 =>
array (
'CONDITION' => '#^/company/history/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/company/history/index.php',
'SORT' => 100,
),
8 =>
array (
'CONDITION' => '#^/company/reviews/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/company/reviews/index.php',
'SORT' => 100,
),
9 =>
array (
'CONDITION' => '#^/company/staff/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/company/staff/index.php',
'SORT' => 100,
),
10 =>
array (
'CONDITION' => '#^/info/articles/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/info/articles/index.php',
'SORT' => 100,
),
11 =>
array (
'CONDITION' => '#^/info/stock/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/info/stock/index.php',
'SORT' => 100,
),
12 =>
array (
'CONDITION' => '#^/info/news/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/info/news/index.php',
'SORT' => 100,
),
21 =>
array (
'CONDITION' => '#^/materials/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/materials/index.php',
'SORT' => 100,
),
1 =>
array (
'CONDITION' => '#^/products/#',
'RULE' => '',
'ID' => 'bitrix:catalog',
'PATH' => '/products/index.php',
'SORT' => 100,
),
18 =>
array (
'CONDITION' => '#^/services/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/services/index.php',
'SORT' => 100,
),
13 =>
array (
'CONDITION' => '#^/projects/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/projects/index.php',
'SORT' => 100,
),
14 =>
array (
'CONDITION' => '#^/info/faq/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/info/faq/index.php',
'SORT' => 100,
),
20 =>
array (
'CONDITION' => '#^/catalog/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/catalog/index.php',
'SORT' => 100,
),
2 =>
array (
'CONDITION' => '#^/news/#',
'RULE' => '',
'ID' => 'bitrix:news',
'PATH' => '/news/index.php',
'SORT' => 100,
),
);