location ^~ /uploads/thumbs/ {
root /home/admin/web/site-b.com/public_html;
try_files $uri @proxy;
}
location @proxy {
proxy_pass http://11.22.33.44:80$uri;
proxy_set_header Host site-a.com;
} 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] To use a literal instance of a special character in a regular expression, precede it by two backslash (\) characters. The MySQL parser interprets one of the backslashes, and the regular expression library interprets the other.
'^[А-ЯЁ][а-яё]+\\s[А-ЯЁ]\\.[А-ЯЁ]\\.$' RewriteCond %{REQUEST_FILENAME} !-REQUEST_FILENAMERewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)/\.html /$1.html [R=301,L]RewriteEngine on. RewriteRule ^(.+)/[0-9]{11}/?$ /$1 [R=301,L]location /_next/static/ {
alias /var/www/promo/nextjs-coupon/.next/static;^~ и в alias добавить /location ^~ /_next/static/ {
alias /var/www/promo/nextjs-coupon/.next/static/; /file.txtRewriteEngine 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]fastcgi_param APP_SETTINGS app-settings-12;
fastcgi_param API_ENDPOINT app-endpoint-outer;
fastcgi_param USE_SHOTLINKS false;fastcgi_param PHP_VALUE auto_prepend_file=$document_root/file.php; server_name site.ru; server_name www.site.ru; rewrite ^/(.*)/$ /$1 permanent;
if ($request_uri ~ "\.html\?selected_section=discussion") {
return 301 $uri;
}