How to redirect whole web site?

  • Thread starter Thread starter hb
  • Start date Start date
H

hb

Hi,

I have web site written in C# using Asp.Net. I need to move it from server1
to server2.
Since there is a delay from the moment I send change request to domain
registrar for
new IP to the moment the change takes place, I need to redirect all requests
from server1
to server2 using new IP.

Is there an easy way to do this? (like some code in web.config or
global.asax)

Thank you

hb
 
Why can't you just keep the website running in two places for the 24 hour wait? Other than, hmm, you could put a Response.Redirect(http://my.newurl.com/) in Session_Start. Or if you really wanted to do it right, you could change your router around to forward all requests to "oldIP" ip at port 80 to "newIP".

--Michael
 
Michael,

It works. Thank you!

hb
Why can't you just keep the website running in two places for the 24 hour
wait? Other than, hmm, you could put a
Response.Redirect(http://my.newurl.com/) in Session_Start. Or if you really
wanted to do it right, you could change your router around to forward all
requests to "oldIP" ip at port 80 to "newIP".

--Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top