/.htaccess
или /custom/.htaccess
указать для 401 какой-нибудь существующий файл. ErrorDocument 401 /file.html
ErrorDocument 401 " Some text "
ErrorDocument 401 default
/.htaccess
исключение для запросов со статусом 401 и пустить их в обход правил Wordpress.RewriteCond %{ENV:REDIRECT_STATUS} =401
RewriteRule ^ - [L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^site.com [OR]
RewriteCond %{HTTP_HOST} ^www.site.com [OR]
RewriteCond %{HTTP_HOST} ^www.site.net
RewriteCond %{THE_REQUEST} !^\S+\s/sub/
RewriteRule ^(.*)$ https://site.net/$1 [L,R=301]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^site.com [OR]
RewriteCond %{HTTP_HOST} ^www.site.com [OR]
RewriteCond %{HTTP_HOST} ^www.site.net
RewriteCond %{REQUEST_URI} !^/sub/
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^(.*)$ https://site.net/$1 [L,R=301]
RewriteCond %{THE_REQUEST} " /index\.php\?route=product/customize&product_id=57 "
RewriteRule ^ https://site.com/page_one? [R=301,L]
RewriteCond %{QUERY_STRING} (^|&)route=product/customize($|&)
RewriteCond %{QUERY_STRING} (^|&)product_id=57($|&)
RewriteRule ^index\.php$ https://site.com/page_one? [R=301,L]
RewriteEngine on
. RewriteRule ^(login|forgot-password|create-account|my-account)/ /? [R=301,L]
RewriteEngine on
.RewriteRule ^(login|forgot-password|create-account|my-account)/ - [R=404,L]
RewriteRule ^(.+)/\.html /$1.html [R=301,L]
RewriteEngine on
. RewriteRule ^(.+)/[0-9]{11}/?$ /$1 [R=301,L]
/file.txt
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/file.txt -f
RewriteRule ^ - [F]
из-за чего на почту стали приходить пустые данные с форм обратной связи
# редирект с 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]
RewriteRule ^razdel/(start-with.*)$ /novyi-razdel/$1 [R=301,L]
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]
RewriteEngine On
RewriteRule ^blog/(category-\d+)$ /blog/index/$1 [R=301,L]
DirectorySlash Off
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/$0.html -f
RewriteRule .+ /$0.html [L]
RewriteCond %{THE_REQUEST} " /\?(search=songs&tags=\S+) "
RewriteRule ^ /search.html?%1 [R=301,L]
?%1
можно убрать.RewriteCond %{THE_REQUEST} " /\?search=songs&tags="
RewriteRule ^ /search.html [R=301,L]
RewriteCond %{QUERY_STRING} ^search=songs&tags=
RewriteRule ^$ /search.html [R=301,L]
RewriteCond %{QUERY_STRING} (^|&)search=songs($|&)
RewriteCond %{QUERY_STRING} (^|&)tags=[^&]+($|&)
RewriteRule ^$ /search.html [R=301,L]
RewriteCond %{THE_REQUEST} ([^\s]*)\.php(\?[^\s]*)?
RewriteRule (.*) %1 [R=301,L]
/file1.php
и /folder/file2.php
RewriteCond %{REQUEST_URI} !^/file1\.php
RewriteCond %{REQUEST_URI} !^/folder/file2\.php
RewriteCond %{THE_REQUEST} ([^\s]*)\.php(\?[^\s]*)?
RewriteRule (.*) %1 [R=301,L]
RewriteEngine on
RewriteRule ^[^/]+\.php$ /links/$0 [L]
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/links/$0 -f
RewriteRule ^[^/]+\.php$ /links/$0 [L]