A
A
Al fox2016-09-16 07:39:18
htaccess
Al fox, 2016-09-16 07:39:18

How to configure .htacctss for bulk 3rd level domain forwarding?

There is a name1.ru domain with 3rd level domains. You need to redirect the site itself and 3rd level domains to name2.ru . Manually driving in each domain is not an option, it is necessary that the corresponding *.name1.ru records are redirected to *.name2.ru.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2016-09-16
@AleBas

The easiest way is to register Alias ​​in virtual hosts (add a line or entry) and that's it.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+\.)oldDomain\.com$ [NC]
RewriteRule ^ http://%1newDomain\.com%{REQUEST_URI} [R=301,L,NE]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question