<Files "users.json">
deny from all
</Files>
location / { if (!-e $request_filename){ rewrite ^/(.*) /index.php?code=$query_string; } location ~ [^/]\.ph(p\d*|tml)$ { try_files /does_not_exists @php; } }
location / {
}
location ~ ^/dir/([0-9A-Za-z]*)$ {
try_files $uri /dir/index.php?code=$1&$args;
}
location @php {
на location \.php$ {
^amp
будет работать в RewriteRule, а для RedirectMatch нужно добавить "/" ^/amp
RedirectMatch 301 ^/amp/[0-9]*\.html$ https://site.ru/
RewriteRule ^amp/[0-9]*\.html$ https://site.ru/ [R=301,L]
if ($request_uri ~ "^/catalog/search/\?q=(.*)") {
return 301 /catalog/?search=$1;
}
location = /catalog/search/ {
if ($args ~ "^q=(.*)") {
return 301 /catalog/?search=$1;
}
}
location = /catalog/search/ {
return 301 /catalog/?search=$arg_q;
}
$ar = array('Parameter #0 [ $operationName ]', 'Parameter #0 [ $operationName ]', 'Parameter #0 [ $operationName ]');
preg_match_all('/(?<=\[).+?(?=\])/' , implode($ar), $matches);
print_r($matches[0]);
AddDefaultCharset UTF-8
RewriteEngine On
RewriteCond %{HTTP_REFERER} ok\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} mamba\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} facebook\.com [NC]
RewriteRule ^ - [F]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /doma/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /doma/index.php [L]
</IfModule>
# END WordPress
DirectorySlash Off
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ https://site.ru/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[^?]+// [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule .* https://site.ru/$0 [R=301,L]
RewriteCond %{THE_REQUEST} ^\S+\s([^?\s]*?)(/index)?\.html
RewriteRule ^ https://site.ru%1 [R=301,L,NE]
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*) /$1.html [L]
proxy_redirect 'https://' 'http://45.141.76.164:8282/p/';