$pattern = '/[\w.%+-]+@(?:[a-z\d-]+\.)+[a-z]{2,}|\[mailto:[^\]]+(*SKIP)(*F)/i';
$str = preg_replace($pattern, '[mailto:$0]', $str);RewriteCond %{QUERY_STRING} !^$
RewriteCond %{QUERY_STRING} !(^|&)srp=
RewriteCond %{QUERY_STRING} !(^|&)srk=
RewriteRule ^(.+?)\.html$ https://%{HTTP_HOST}/$1.html? [L,R=301]
RewriteRule ^(.+?)\.html(?!/amp/).+$ https://%{HTTP_HOST}/$1.html? [L,R=301]RewriteCond $2 ^(?!/amp/).+ [OR]
RewriteCond &%{QUERY_STRING} ^(?!.*&srp=)(?!.*&srk=)&.+
RewriteRule ^(.+?)\.html(.*)$ https://%{HTTP_HOST}/$1.html? [L,R=301] RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} SemrushBot-SA|rogerbot|megaindex\.com
RewriteRule ^ - [F]<VirtualHost> ^([^|\n]+)\|([-.\d]+)\|([-.\d]+)\|([-.\d]+)\|([-.\d]+)\|([-.\d]+){"name":'$1', "h":$2, "s":$3, "a":$4, "b":$5, "c":$6}, RewriteCond %{REQUEST_URI} ^/catalog/perchatki/$1 RewriteRule ^(.*)$ /catalog/ekipirovka/perchatki/$1 [R=301,L]
RewriteCond %{REQUEST_URI} ^/catalog/perchatki/(.*)
RewriteRule ^(.*)$ /catalog/ekipirovka/perchatki/%1 [R=301,L]RewriteRule ^(catalog)/(perchatki/.*)$ /$1/ekipirovka/$2 [R=301,L] <IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} "^GET /CMS/ "
RewriteRule ^ / [R=301,L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /CMS/index.php [L]
</IfModule>