RewriteEngine on
RewriteCond %{THE_REQUEST} ^\S+\s/%3F [NC]
RewriteRule .* /$0 [R=301,L,QSA]
GET /%3Fs%3Dsanivite%26post_type%3Dproduct%26type_aws%3Dtrue?_openstat=dGVzdDsxOzE7 HTTP/1.1
^\S+\s/%3F
ловит все адреса начинающиеся с /%3F
%XX
?s=sanivite&post_type=product&type_aws=true
/?s=sanivite&post_type=product&type_aws=true&_openstat=dGVzdDsxOzE7
RewriteCond %{QUERY_STRING} !^$
на RewriteCond %{THE_REQUEST} \?
<IfModule mod_rewrite.c>
RewriteCond %{THE_REQUEST} \?
RewriteCond %{QUERY_STRING} !(^|&)srp=
RewriteCond %{QUERY_STRING} !(^|&)q=
RewriteRule ^(.+?)\.html$ https://%{HTTP_HOST}/$1.html? [L,R=301]
</IfModule>
<IfModule mod_rewrite.c>
RewriteRule ^(.+?)\.html(?!/amp/).+$ https://%{HTTP_HOST}/$1.html? [L,R=301]
</IfModule>
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} /pages/([^.]+)\.php [NC]
RewriteRule ^ /%1 [L,R=301]
RewriteCond %{QUERY_STRING} (?:^|&)id=([^&]+)
RewriteRule ^id$ /%1? [R=301,L]
RewriteRule ^(id_\d+)$ pages/id.php?id=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/pages/$1\.php -f
RewriteRule ^([^.]+?)/?$ pages/$1.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1\.php -f
RewriteRule ^([^.]+?)/?$ $1.php [L]
если после product_id=894 есть какое-то значение
product_id=[0-9]+[^0-9]
или product_id=\d+\D
RewriteCond %{QUERY_STRING} ^(route=product/product&path=\d+&product_id=\d+)\D
RewriteRule ^index\.php$ /index.php?%1 [R=301,L]
RewriteCond &%{QUERY_STRING}& ^(?=.*&(route=product/product)&)(?=.*(&path=\d+)&)(?=.*(&product_id=\d+)[^&\d])
RewriteRule ^index\.php$ /index.php?%1%2%3 [R=301,L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(?>www\.|)(.+)\.site\.ru$ [NC]
RewriteRule ^en/$ https://site.ru/en/%1/ [R=301,L]
RewriteCond %{QUERY_STRING} !=""
RewriteCond %{THE_REQUEST} \?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} \?
RewriteCond %{QUERY_STRING} !^p=.*
RewriteCond %{QUERY_STRING} !^s=.*
RewriteCond %{REQUEST_URI} !^/wp-admin.*
RewriteRule ^(.*)$ /$1? [R=301,L]
</IfModule>
RewriteEngine on
RewriteRule ^ https://xn--m1aabangb.xn--p1ai/ [R=301,L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(?:www\.|)sto-tonn\.ru [NC]
RewriteRule ^ https://xn--m1aabangb.xn--p1ai/ [R=301,L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)\.xml$ $1.html [L]
RewriteEngine On
RewriteCond %{THE_REQUEST} " /color\.html"
RewriteRule ^ /color/ [R=301,L]
RewriteRule ^color/$ /color.html [L]
RedirectMatch 301 ^/(.+) http://site2.ru/a?link=$1
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?site1\.ru$ [NC]
RewriteRule (.+) http://site2.ru/a?link=$1 [R=301,L]
RewriteEngine On
RewriteCond %{REQUEST_URI} !/$ [OR]
RewriteCond %{THE_REQUEST} ^[^?]+(?://|--)
RewriteCond $1 ^(.*-)-(.*)$|(.*)
RewriteRule ^([^.]+?)/?$ https://www.soskin.com.ua/%1%2%3/ [R=301,L]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.soskin.com.ua/$0 [R=301,L]
AuthName "Please enter your credentials. Website is available only to authorized users."
AuthType Basic
AuthUserFile /var/www/html/master/.htpasswd
<RequireAny>
Require valid-user
Require expr %{THE_REQUEST}=~m#^\S+\s/api#
</RequireAny>
AuthName "Please enter your credentials. Website is available only to authorized users."
AuthType Basic
AuthUserFile /var/www/html/master/.htpasswd
Require valid-user
Satisfy Any
SetEnvIf Request_URI ^/api api_allow=1
Order Allow,Deny
Allow from env=api_allow
Allow from env=redirect_api_allow
Страница выдала "слишком много перенаправлений"
RewriteEngine On
RewriteRule ^(.*)$ https://new-domain.ru/$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.ru$ [NC]
RewriteRule ^(.*)$ https://new-domain.ru/$1 [R=301,L]
https://old-domain.ru
на https://new-domain.ru
RewriteEngine On
добавить RewriteRule ^index\.php/(.*) http://site.local/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule .* http://site.local/$0 [R=301,L]
RewriteEngine on
# site1.ru/cat/ -> site2.ru/cat2
RewriteRule ^cat/$ https://site2.ru/cat2 [R=301,L]
# site1.ru/cat/item -> site2.ru/item
RewriteRule ^cat/(.+)$ https://site2.ru/$1 [R=301,L]
# site1.ru -> site2.ru
# site1.ru/%любая_другая_страница% -> site2.ru
RewriteRule ^ https://site2.ru [R=301,L]