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_FILENAME
RewriteCond %{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.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]
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;
}
location = /abcd/auth/sign-in {
proxy_pass http://198.12.123.42.23/auth/sign-in;
}
location ~ ^/abcd/auth/sign-in$ {
rewrite ^ /auth/sign-in break;
proxy_pass http://198.12.123.42.23;
}
location ~ ^/abcd(/auth/sign-in)$ {
proxy_pass http://198.12.123.42.23$1;
}
(?:^|\s)[a-zA-Zа-яА-Я]+\s\K#[a-zA-Zа-яА-Я]+(?=[,.!:?\s]*\s[a-zA-Zа-яА-Я])
(?<=(?:^|\s)[a-zA-Zа-яА-Я]+\s)#[a-zA-Zа-яА-Я]+(?=[,.!:?\s]*\s[a-zA-Zа-яА-Я])