Clicky

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.

asked 12/06/2011 05:08

benjaminfam's gravatar image

benjaminfam ♦♦


8 Answers:

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

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

nrisimha
link

answered

Nrisimha's gravatar image

Nrisimha

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

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
<!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>


link

answered 2011-12-06 at 13:15:22

Nrisimha's gravatar image

Nrisimha


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

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
<!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>


link

answered 2011-12-06 at 13:22:04

Nrisimha's gravatar image

Nrisimha



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


link

answered 2011-12-06 at 13:27:17

Nrisimha's gravatar image

Nrisimha

just put domain2 URL into domain 1 URL redirection Option.
link

answered 2011-12-06 at 13:36:02

vinu113's gravatar image

vinu113

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.
link

answered 2011-12-06 at 21:12:38

benjaminfam's gravatar image

benjaminfam

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.
link

answered 2011-12-07 at 06:23:53

benjaminfam's gravatar image

benjaminfam

I didn't actually get a solution, but rather found a work-around on my own.

link

answered 2011-12-13 at 07:34:50

benjaminfam's gravatar image

benjaminfam

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×2
×30

Asked: 12/06/2011 05:08

Seen: 528 times

Last updated: 12/17/2011 05:18