RewriteRule ^news-open(/|$) https://dominant.by/news [R=301,L]
freestyleshop.by/news-open -> dominant.by/news
freestyleshop.by/news-open/ -> dominant.by/news
freestyleshop.by/news-open/page -> dominant.by/news
RewriteRule ^oldcategory1(.*) https://dominant.by/newcategory1$1 [R=301,L]
И возможно пару разделов старого сайта на эти же разделы на новом,
RewriteRule ^(category1|category2)/.* https://dominant.by/$0 [R=301,L]
делает так:freestyleshop.by/category1/ -> dominant.by/category1/
freestyleshop.by/category2/ -> dominant.by/category2/
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.|)freestyleshop\.by$ [NC]
RewriteRule ^oldcategory1/(.*) https://dominant.by/newcategory1/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.|)freestyleshop\.by$ [NC]
RewriteRule ^oldcategory2/(.*) https://dominant.by/newcategory2/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.|)freestyleshop\.by$ [NC]
RewriteRule ^ https://dominant.by/ [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.|)freestyleshop\.by$ [NC]
RewriteRule ^(category1|category2)/.* https://dominant.by/$0 [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.|)freestyleshop\.by$ [NC]
RewriteRule ^ https://dominant.by/ [R=301,L]
(?<=...) (?=...)
работает только поиск, а замена там напрочь сломана.(<p>\d*)\s
$1
replace all
\s(?=[\s\d]*<\/p>)
работает нормально. header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . basename($file));
Это обратные ссылки или символы в восьмеричном формате
https://www.php.net/manual/ru/regexp.reference.bac...
Синтаксис
\g1
вместо\1
поможет убрать двусмысленность.Обновил ответ.