RewriteCond %{HTTP_HOST} ^(www\.)?site\.ru$ [NC]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ http://m.site.ru/$1 [L,R=302]
RewriteCond %{HTTP_HOST} ^site\.ru$ [NC]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ http://m.site.ru/$1 [L,R=302]
catalog/
добавить (?!books?-)
RewriteRule ^(catalog)/(?!books?-)([^/]+)/$ /$1/books-$2/ [R=301,L]
RewriteRule ^(catalog)/(?!books?-)[^/]+/([^/]+)/$ /$1/book-$2/ [R=301,L]
RedirectMatch ^/(catalog)/(?!books?-)([^/]+)/$ /$1/books-$2/
RedirectMatch ^/(catalog)/(?!books?-)[^/]+/([^/]+)/$ /$1/book-$2/
Что нужно исправить чтобы все работало
\(
<blockquote>(?:(?!</blockquote>).)*?href.*?</blockquote>
//blockquote[.//a]
SetEnvIfNoCase User-Agent "BackupLand" bad_bot
SetEnvIfNoCase User-Agent "Nimbostratus-Bot" bad_bot
SetEnvIfNoCase User-Agent "Photon" bad_bot
Order Allow,Deny
Allow from all
Deny from env=bad_bot
Deny from all
<Files ~ "\.(jpe?g|png|gif)$">
Order deny,allow
Deny from env=bad_bot
</Files>
import re
text = 'head[#f]i[#r#s[t#]c[#second#]tail'
for m in re.finditer('\[#(.*?)#\]', text):
print(m.group(1))
$regex = "/SELECT aaa FROM bbb WHERE BINARY value='((?:\\\\.|[^'])*+)'/";
preg_match($regex, $text, $match);
location /admin/ {
rewrite (.*) $1?branding=1 break;
proxy_pass http://site2.com;
}
RewriteCond %{REQUEST_URI} [A-Z]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ https://site.ru${lc:%{REQUEST_URI}} [L,R=301]
s/pattern/substitution/[infq]
|
там можно свободно использовать s/pattern/a || b/
n
, то и шаблон будет обработан как обычная строка s/a || b/abc/n
|
нужно экранировать s/a \|\| b/abc/
.s/\Qa || b\E/abc/
.