RewriteRule ^(.*)$ https://svai-a.ru/$1 [L,R=301]
preg_replace('~<(a|h1)\b.*?</\1>(*SKIP)(*F)|(222)~si', '<a href="#link">\\2</a>', $str);
RewriteCond &%{QUERY_STRING} ^(.*?)&page=([^&]+)(.*)
RewriteCond /$1/page-%2?%1%3 ^(.+?\?)&*(.*)
RewriteRule ^(news)$ %1%2 [R=301,L]
RewriteCond %{QUERY_STRING} ^()page=([^&]+)&*(.*) [OR]
RewriteCond %{QUERY_STRING} ^(.*?)&page=([^&]+)(.*)
RewriteRule ^(news)$ /$1/page-%2?%1%3 [R=301,L]
&
в конце строки ?utm=ex&
, то сойдёт и так.RewriteCond %{QUERY_STRING} ^(|.*?&)page=([^&]+)&*(.*)
RewriteRule ^(news)$ /$1/page-%2?%1%3 [R=301,L]
location ~ \.(css|jpe?g|png)$ {
try_files $uri @b;
}
location @b {
proxy_pass https://1.1.1.1;
proxy_set_header Host site.ru;
proxy_ssl_name site.ru;
}
PHP Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/a/alechas/.../public_html/UnitPay.php on line 208
array_map(function ($item) {
function ($item) {
добавили начиная с PHP 5.3geo $a {
default 0;
192.168.1.0/24 1;
10.1.0.0/16 1;
}
map $a$request_uri $b {
default 0;
~^1/mddd/service/test/exec-post\?f=modules\.testmodules 1;
}
server {
if ($b) {
return 403;
}
RewriteRule ^sitemap.xml$ sitemap.xml [L]
RewriteRule ^admin/(.*)$ admin/$1 [L]
RewriteRule ^uploads/([^/]+)/(.*)$ getphoto.php?folder=$1&src=$2 [L]
RewriteRule (js|css|fonts)/(.*) $1/$2 [L]
RewriteRule img/(.*)$ getphoto.php?src=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/.]+)$ /$1/ [L,R=301]
RewriteRule ^(.*)/$ index.php?src=$1 [QSA,L]
Какой из каталогов будет использоваться для временных файлов определяется параметром use_temp_path (1.7.10). Если параметр не задан или установлен в значение “on”, то будет использоваться каталог, задаваемый директивой proxy_temp_path для данного location. Если параметр установлен в значение “off”, то временные файлы будут располагаться непосредственно в каталоге кэша.
RewriteRule ^test1/fruits/$ https://domain2.ru/test2/fruits-test/ [R=301,L]
RewriteRule ^test1-test/$ https://domain2.ru/test2-test/ [R=301,L]
RewriteRule ^(.*)$ /index.php/$1 [L,QSA]
срабатывает раньше чем RewriteRule ^(.*)$ https://newsite.ru/$1 [R=301,L]
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.|)oldsite\.ru$ [NC]
RewriteRule ^(.*)$ https://newsite.ru/$1 [R=301,L]
RewriteCond $1 !^(index\.php|uploads|robots\.txt|favicon\.ico|sitemap\.xml)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L,QSA]
RewriteRule ^katalog/(?!product/)[^/]+/(?!brand-)([^/]+)/$ https://site.ru/katalog/product/$1/ [R=301,L]
RewriteCond $2 !=product
RewriteCond $3 !^brand-
RewriteRule ^(katalog)/([^/]+)/([^/]+)/$ https://site.ru/$1/product/$3/ [R=301,L]