Answer the question
In order to leave comments, you need to log in
Redirect from subdomain to another htaccess subdomain?
Hello! Didn't find a solution. There is a site with a bunch of subdomains. and he moves to another domain. subdomains are the same. There is some general rule not to write separately for each subdomain. there are 20 of them.
Answer the question
In order to leave comments, you need to log in
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.)?site\.ru$
RewriteCond %{HTTP_HOST} ^(.+)\.site\.ru$
RewriteRule (.*) http://%1.newsite .ru/$1 [R=301,L]
This helped! Maybe someone will come in handy.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question