^
начало строки и $
конец строки./^[a-z0-9.\s\-]{1,235}$/
RewriteEngine on
# site1.ru/cat/ -> site2.ru/cat2
RewriteRule ^cat/$ https://site2.ru/cat2 [R=301,L]
# site1.ru/cat/item -> site2.ru/item
RewriteRule ^cat/(.+)$ https://site2.ru/$1 [R=301,L]
# site1.ru -> site2.ru
# site1.ru/%любая_другая_страница% -> site2.ru
RewriteRule ^ https://site2.ru [R=301,L]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule .* https://%{HTTP_HOST}/$0 [L,R=301]
RewriteCond %{THE_REQUEST} //
RewriteRule .* https://%{HTTP_HOST}/$0 [L,R=301]
\d+
можно поменять на \d++
\d++(?:\.\d+)?(?=\s*руб\.)
\d+(*SKIP)(?:\.\d+)?(?=\s*руб\.)
$str = 'Число 560
Размерный ряд: 42 88,44,46
#Цена: 400 руб 400коп. шт.
Место: 2А-75 корпус А';
preg_match('/ряд:.+/', $str, $m);
preg_match_all('/\d+/', $m[0], $r);
print_r($r[0]);
preg_match_all('/(?:\G(?!^)|ряд:)[\s,]\K\d+/', $str, $r);
RewriteRule ^catalog/(.+)/page/([0-9]+)$ catalog.php?url=$1&page=$2 [L]
RewriteRule ^catalog/(.+)$ catalog.php?url=$1 [L]
(?!...)
, то можно попробовать заменить -(\d{1,3})-
на -(7([0-689]\d?|7[0-689]?)?|3([02-9]\d?|1[0-46-9]?)?|[0-24-68-9]\d{0,2})-
preg_replace('#якорь|\[special\].*?\[/special\](*SKIP)(*F)#s', 'TXT', $str);
RewriteEngine on
RewriteRule ^games/(games/StreamingAssets/aa/settings\.json)$ https://site.com/$1 [R=301,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{QUERY_STRING} (?:^|&)q=%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D0%B8-%D0%94%D0%B5%D1%82%D1%81%D0%BA%D0%B8%D0%B5\+%D0%BA%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D0%BA%D0%B8(?:$|&)
RewriteRule ^2-glavnaya$ /? [R=301,L]
try_files $uri $uri/ /index.html$is_args$args;
try_files $uri $uri/ /index.html =404;
location / { try_files $uri $uri/ =404; } rewrite ^/([a-z,0-9,-]+)$ /pages/$1.html last;
location / {
try_files $uri $uri/ /pages$uri-$arg_p.html /pages$uri-1.html /pages$uri.html =404;
}
rewrite ^/([a-z0-9-]+)$ /pages/$1-$arg_p.html last;
location ~ ^(/pages/.+)-\.html$ {
internal;
try_files $1-1.html $1.html =404;
}
location ~ ^/pages/.+\.html$ {
internal;
try_files $uri =404;
}
location / {
rewrite ^ /index.html break;
}
location = /api/ {
proxy_pass http://localhost:4200;
}