Redirect a domain to another domain/path

I have a web site that I'm closing out the hosting service for and I want to redirect all traffic to a path on one of my other sites.  For example, I want all traffice for www.mydomain1.com to be redirected to www.mydomain2.com/path/pageRepresentingMydomain1.htm.   I have access to the name servers, registrar, etc. for both domains, but I'm not certain what is the best way to achieve this.

The server that will accept traffic for both domains is running IIS on Windows Server 2008.
benjaminfamAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NrisimhaCommented:

You create a index.html file and in metadata put:

<meta http-equiv="refresh" content="2;url=www.mydomain2.com/path/pageRepresentingMydomain1.htm/">

nrisimha
0
NrisimhaCommented:
And here is a all code that you need.
Redirection will be for 3 second but you can change it in metatag:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title>New Text Document</title>
  
[b]  <meta http-equiv="refresh" content="[b]3[/b];url=http://www.mydomain2.com/path/pageRepresentingMydomain1.htm/"> [/b]


</head>
<body>
<center>
<br>
Redirection for 3 seconds
</center>
</body>
</html>

Open in new window


0
NrisimhaCommented:

Sorry, the right code that you will save as index.html and put on your http://www.mydomain1.com/ site is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title>Redirect</title>
  
  <meta http-equiv="refresh" content="3;url=http://www.mydomain2.com/path/pageRepresentingMydomain1.htm/">


</head>
<body>
<center>
<br>
Redirection for 3 seconds
</center>
</body>
</html>

Open in new window


0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

NrisimhaCommented:


So, if you need fast redirection you can put in your index.html page a meta tag where the page will be shown only 1 second.
But, the web browsers need some time for loading a web page index.html so this redirection will be very fast.

Insted a number 3 ( 3 seconds ) you can put number 1 ( 1 second ) in meta tag in index.html so it will look like:

<meta http-equiv="refresh" content="1;url=http://www.mydomain2.com/path/pageRepresentingMydomain1.htm/">

For 10 seconds of redirection put:

<meta http-equiv="refresh" content="10;url=http://www.mydomain2.com/path/pageRepresentingMydomain1.htm/">

And also you can write some sentences in the body tag if you want. But, for 1 second the visitors will can't to read this !

regards

Nrisimha


0
Vivek ReddyCommented:
just put domain2 URL into domain 1 URL redirection Option.
0
benjaminfamAuthor Commented:
Thanks for all of the comments.  I do actually know how to do a redirect as described here.  The problem is that in my fictional example here, www.domain2.com needs to function as normal site - I can't redirect the home page elsewhere.  So I need only incoming traffic that was intended for www.domain1.com to be redirected to the path that lives elsewhere on www.domain2.com.
0
benjaminfamAuthor Commented:
The web host (Blue Host) for one of my sites has a control panel option for adding secondary domains to a site which can point specifically to a subdirectory within another site.  So, I went that route and it seems to work.  I don't know the technical specifics of how it is accomplished under the hood, but the net effect is that I was able to achieve what I needed.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
benjaminfamAuthor Commented:
I didn't actually get a solution, but rather found a work-around on my own.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.