Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm in the process of migrating a forum setup from one version of the software on one machine (older shared Windows host) to a new VPS (Windows Server 2008). To install the software, I used my hosts file to temporarily point the domain at the new IP address. To see the old site, I obviously re-edit the hosts file to remove the reference.

But this leaves me constantly adding/removing a # from my hosts file just so I can switch back and forth between the two servers.

Is there a way to do this more rapidly? I've found a handful of toggling batch scripts, but all they do is automate the addition/removal of the # character ... so there's still a noticeable lag where I have to repeatedly hit F5 to force my system to detect the new settings.

Ideally, I could view both servers at the same time on the same machine. Maybe one through a regular browser session and one through some kind of a proxy. Unfortunately, I don't have the first idea how to set that up.

Ideas?

share|improve this question
add comment

migrated from stackoverflow.com Oct 5 '12 at 12:22

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

2 Answers

up vote 0 down vote accepted

Use a virtual machine or two to run, in effect, a second and third copy of the operating system, and keep each configured to use the appropriate host-IP entry.

Use a second computer entirely, such as a laptop, configured to use the appropriate host entry.

share|improve this answer
    
Not an ideal solution (requires extra hardware or software that I just don't have), but still the best I've seen so far. –  EAMann Aug 30 '11 at 21:50
add comment

Seems like there are a number of small executables that will do this for you. I personally use this one http://archive.msdn.microsoft.com/HostFileManager which does a great job of just overwriting a few values.

If you had to do a lot of hosts, one of these might be better: http://www.tools.toflo.de/HostsSwitcher/ or http://hostprofiles.codeplex.com/

share|improve this answer
add comment

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.