0

I have my main URL (www.example1.com) and I want to redirect my parked domain (www.example2.com) to my main domain, but carry over anything after the root URL.

So I want www.example2.com/home to redirect to www.example1.com/home AND www.example2.com/about to www.example1.com/about, etc...

I tried using a wildcard redirect, but that didn't work.

Any help is appreciated.

2 Answers 2

1
  RewriteCond %{HTTP_HOST} ^example1\.com$ [OR]
  RewriteCond %{HTTP_HOST} ^www\.example1\.com$
  RewriteRule ^(.*)$ http://example2.com/$1 [R=301,L]

You could also do it in apache for the example1.com domain

Redirect permanent / http://domain2.com/
0

Do you really need to redirect one domain to the other?
If both domains have to load the same source code, you can use ServerAlias (Apache) or Host Headers (IIS) and have only one website with multiple domain names listening, all domains must be pointed to the same webserver.
Let me know and i will assist you on how you can do this.

You must log in to answer this question.