webmaze
Registered Member
- Jul 3, 2014
- 59
- 10
I am using a 301 redirect for a domain. Say, domain1.com redirecting to domain2.com. But, the issue I am facing is all the addon domains are also getting redirect to the domain2.com.
Please provide any solution if you have. I tried the following codes but both not working.
First:
Redirect 301 / http://www.domain2.com
Second:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domain1.com$ [NC]
RewriteRule ^(.*)$ http://www.domain1.com/$1 [R=301,L]
Please provide any solution if you have. I tried the following codes but both not working.
First:
Redirect 301 / http://www.domain2.com
Second:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domain1.com$ [NC]
RewriteRule ^(.*)$ http://www.domain1.com/$1 [R=301,L]