Someone
public text v1 · immutableRewriteCond %{HTTP_HOST} !^test\.domain2\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://test.domain2.com/$1 [L,R=301]RewriteCond %{HTTP_HOST} !^test\.domain2\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://test.domain2.com/$1 [L,R=301]