Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

We have existing domain on non-IIS server and now we have moved it to IIS server. Client want us to redirect the URL from existing server to new server with same domain name.

We will modify the .htaccess file to redirect but if we redirect current abc.org to our PROD environment, then the url should still be abc.org. I am not sure whether we can have same domain (abc.org) for two PROD environment?

How to achieve this?

share|improve this question

migrated from stackoverflow.com Sep 12 '11 at 11:38

This question came from our site for professional and enthusiast programmers.

    
There's load balancing and redundancy, but I'm not sure that's what you're going for (e.g. nslookup google.com shows you multiple IPs, but that's for fail-safe) –  Brad Christie Sep 12 '11 at 4:41
    
@Brad Christie We are migrating the application from one server to another but still the original server has to be in place to receive the request and redirect it to new server –  Tech Jerk Sep 12 '11 at 4:44
    
You have 1 of 2 options (as I see it). 1) Forward to a physical IP (but now this means it messes with the virtual directories as you're playign with Host: header.) 2) create a temporary sub-domain until it's perm. migrated (maybe www2.myserver.com) –  Brad Christie Sep 12 '11 at 4:48
1  
The only thing that comes into mind is a Reverse Proxy -- you can do this in Apache (mod_rewrite + mod_proxy) or IIS 7 (URL Rewriting module + Application Request Routing module). Just keep in mind -- if your new server is far from your old server, the response time/page load time will be long, as request will travel trough old server first. –  LazyOne Sep 12 '11 at 15:16

1 Answer 1

there are really three things you should do:

1) change the dns settings (change the A record to point to their new server) and wait for it to propagate.

2) while waiting for it to propagate you should setup a mod_proxy proxypass rule to send all requests to your server to the new one

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass

3) setup a mod_proxy proxypassreverse rule to help with any redirects, etc that come back from the new server

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse

once you have waited for the dns to propagate to the new servers, you can turn off the mod_proxy and give your old server a different url to access it (you could even setup a cname on the dns entries for old.example.com pointing to the ipaddress of the old server and access it that way.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.