Код |
---|
<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On # редирект host.ru -> www.host.ru RewriteCond %{HTTP_HOST} !^www\..+$ [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # редирект /news/123 -> /news/123/ RewriteCond %{REQUEST_URI} ^(.*/[^/\.]+)$ RewriteRule ^(.*)$ http://%{HTTP_HOST}/$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] </IfModule> |
Код |
---|
<? $arUrlRewrite = array( array( "CONDITION" => "#^/catalog/([a-zA-Z0-9_]+)(/*)(.*)?#", "RULE" => "SECTION_CODE=$1", "ID" => "", "PATH" => "/catalog/list.php", ), array( "CONDITION" => "#^/types_of_printing/([\\w\\d_]+)(/)?#", "RULE" => "code=$1", "ID" => "", "PATH" => "/types_of_printing/detail.php", ), array( "CONDITION" => "#^/(.*)/(.*)?#", "RULE" => "ELEMENT_CODE=$1", "ID" => "", "PATH" => "/catalog/detail.php", ), array( "CONDITION" => "#^/products/([\\w\\d]+)(/)?#", "RULE" => "code=$1", "ID" => "", "PATH" => "/products/detail.php", ), array( "CONDITION" => "#^/e-store/books/reviews/#", "RULE" => "", "ID" => "bitrix:news", "PATH" => "/e-store/books/reviews/index.php", ), array( "CONDITION" => "#^/communication/forum/#", "RULE" => "", "ID" => "bitrix:forum", "PATH" => "/communication/forum/index.php", ), array( "CONDITION" => "#^/e-store/xml_catalog/#", "RULE" => "", "ID" => "bitrix:catalog", "PATH" => "/e-store/xml_catalog/index.php", ), array( "CONDITION" => "#^/communication/blog/#", "RULE" => "", "ID" => "bitrix:blog", "PATH" => "/communication/blog/index.php", ), array( "CONDITION" => "#^/service/(.*)/(.*)?#", "RULE" => "ELEMENT_CODE=$1", "ID" => "", "PATH" => "/service/detail.php", ), array( "CONDITION" => "#^/content/articles/#", "RULE" => "", "ID" => "bitrix:news", "PATH" => "/content/articles/index.php", ), array( "CONDITION" => "#^/content/gallery/#", "RULE" => "", "ID" => "bitrix:photogallery_user", "PATH" => "/content/gallery/index.php", ), array( "CONDITION" => "#^/personal/lists/#", "RULE" => "", "ID" => "bitrix:lists", "PATH" => "/personal/lists/index.php", ), array( & |
Цитата |
---|
Требуется настроить 301 редирект со страниц: _site.ru/katalogi _site.ru/katalogi/ _www.site.ru/katalogi на _www.site.ru/katalogi/ |
Цитата | ||
---|---|---|
|