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]
<VirtualHost *:80>
ServerName mysite.net.ua
ServerAlias www.mysite.net.ua
DocumentRoot /var/www/mysite.net.ua/www
</VirtualHost>
<VirtualHost *:80>
ServerName mysite.net.ua
ServerAlias *.mysite.net.ua
UseCanonicalName Off
VirtualDocumentRoot /var/www/mysite.net.ua/%-4
</VirtualHost>
^([a-z0-9_\.-]+)@([a-z0-9_\.-]+)\.([a-z\.]{2,6})$
"([^"]*)"|'([^']*)'
\'
\\
https://regex101.com/r/qDUjb2/4'((?>\\.|[^'])*)'
'((?>\\.|[^'])*)'|"((?>\\.|[^"])*)"
RewriteEngine On
RewriteRule . / [R=301,L]
RewriteEngine On
RewriteCond %{THE_REQUEST} "!^\S+ / "
RewriteRule ^ /? [R=301,L]
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/