https://
.RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?kamen46\.ru$ [NC]
RewriteRule ^(.*)$ https://xn--46-6kcijfxfggqnar4a5o.xn--p1ai/$1 [R=301,L]
/path?query
/path
RewriteCond %{QUERY_STRING} ^(ID=6992&PRODUCT)=6905$
RewriteRule ^collections_qr/collection_detail\.php$ /$0?%1=6856 [R=301,L]
RewriteCond %{THE_REQUEST} " (/collections_qr/collection_detail\.php\?ID=6992&PRODUCT)=6905 "
RewriteRule ^ %1=6856 [R=301,L]
map $args $_args {
~^redirect=[^&]*&?(.*) $1;
~^(.*?)&redirect=[^&]*(&?.*) $1$2;
}
server {
location = / {
error_page 418 = @rewrite;
if ($arg_redirect ~ '^(?<_url>https?://[\w.-]+)') {
return 418;
}
}
location @rewrite {
rewrite ^ /?$_args? break;
proxy_pass $_url;
proxy_http_version 1.1;
proxy_ssl_server_name on;
resolver 8.8.8.8;
}
DirectorySlash off
RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^(.*)\.html /$1 [R=301,L]
RewriteCond %{DOCUMENT_ROOT}/$0.html -f
RewriteRule .* /$0.html [L]
https://site.ru/?query
RewriteCond %{THE_REQUEST} "^\S+ /\?%5B%20%D0%B2%D1%8B%D0%B2%D0%B5%D0%B4%D0%B5%D0%BC%20%D1%81%D0%B0%D0%B9%D1%82%20%D0%B8%D0%B7-%D0%BF%D0%BE%D0%B4%20%D1%81%D0%B0%D0%BD%D0%BA%D1%86%D0%B8%D0%B9%20%D0%AF%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D0%B0%20\(%D0%B7%D0%B0%20%D0%B7%D0%B0%D0%BA%D1%83%D0%BF%D0%BA%D1%83%20%D1%81%D1%81%D1%8B%D0%BB%D0%BE%D0%BA\)%20-%20seoscout\.ru%20%5D "
RewriteRule ^ https://site.ru/? [R=301,L]
RewriteCond %{QUERY_STRING} "^%5B%20%D0%B2%D1%8B%D0%B2%D0%B5%D0%B4%D0%B5%D0%BC%20%D1%81%D0%B0%D0%B9%D1%82%20%D0%B8%D0%B7-%D0%BF%D0%BE%D0%B4%20%D1%81%D0%B0%D0%BD%D0%BA%D1%86%D0%B8%D0%B9%20%D0%AF%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D0%B0%20\(%D0%B7%D0%B0%20%D0%B7%D0%B0%D0%BA%D1%83%D0%BF%D0%BA%D1%83%20%D1%81%D1%81%D1%8B%D0%BB%D0%BE%D0%BA\)%20-%20seoscout\.ru%20%5D$"
RewriteRule ^$ https://site.ru/? [R=301,L]
RewriteCond %{QUERY_STRING} "=%5B%20%D0%B2%D1%8B%D0%B2%D0%B5%D0%B4%D0%B5%D0%BC%20%D1%81%D0%B0%D0%B9%D1%82%20%D0%B8%D0%B7-%D0%BF%D0%BE%D0%B4%20%D1%81%D0%B0%D0%BD%D0%BA%D1%86%D0%B8%D0%B9%20%D0%AF%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D0%B0%20(%D0%B7%D0%B0%20%D0%B7%D0%B0%D0%BA%D1%83%D0%BF%D0%BA%D1%83%20%D1%81%D1%81%D1%8B%D0%BB%D0%BE%D0%BA)%20-%20seoscout.ru%20%5D"
RewriteRule ^$ https://site.ru/? [R=301,L]
RewriteRule (.*) index.php?q=$1 [L]
?q=
RewriteRule ^news/2021/professor-bez-shtanov\.html$ https://www.crawler.pro/news/2021/produser-dlya-marketologa/professor-bez-shtanov.html [R=301,L]
rewrite ^/url1/(url2/url3/) https://domain2.ru/$1 permanent;
if ($request_uri ~ '^/url1/(url2/url3/.*)') {
return 301 https://domain2.ru/$1;
}
RewriteRule ^(.+)/\.html /$1.html [R=301,L]
RewriteEngine on
. из-за чего на почту стали приходить пустые данные с форм обратной связи
# редирект с www на без www
# и убираем лишние слеши
RewriteEngine On
RewriteCond %{THE_REQUEST} // [OR]
RewriteCond %{HTTP_HOST} ^www\.site\.com$ [NC]
RewriteRule ^(.*)$ https://site.com/$1 [R=301,L]
RewriteRule ^index(\.\w+)?$ https://site.com/ [R=301,L]
RewriteCond %{THE_REQUEST} ^(GET|HEAD).+\.php
RewriteRule ^(.*)\.php https://site.com/$1.html [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ $1.php [L]
server_name site.ru; server_name www.site.ru; rewrite ^/(.*)/$ /$1 permanent;
if ($request_uri ~ "\.html\?selected_section=discussion") {
return 301 $uri;
}
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ https://%{HTTP_HOST}/$1/ [L,R=301]
!-f
нужна проверка что это существующая папка -d
.RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*[^/])$ https://site.ru/$1/ [R=301,L]
*
на +
### START Редирект с первой страницы пагинации на основную
RewriteBase /
RewriteRule ^(.+)page/1(/|)$ $1 [R=301,L]
### END Редирект с первой страницы на основную
### Редиректы с index.php на сайт
RewriteCond %{THE_REQUEST} " /(page/1/?|)[ ?]"
RewriteRule .* /index.php [R=301,L]
RedirectMatch 301 ^/(catalog1)/[^/]+/([^/]+\.html)$ /$1/$2
RewriteEngine on
RewriteRule ^(catalog1)/[^/]+/([^/]+\.html)$ /$1/$2 [R=301,L]
RewriteRule ^(.*)$
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?site\.com [NC]
RewriteRule ^old/page$ https://site.ru/new/page [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.)?site\.com [NC]
RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L]
Redirect 301 categoriya https://site.ru/categoriya-new
RewriteEngine on
RewriteRule ^categoriya$ /categoriya-new [R=301,L]
RewriteRule ^podcategoriya$ /podcategoriya-new [R=301,L]
RewriteRule ^categoriya/podkategoriya/(\S+)$ /categoriya-new/podkategoriya-new/$1 [R=301,L]