I figured this out after growing tired of having to remember a bunch of IP's for different sites I was developing at home.
This will work with IIS, Apache, Tomcat and I'd assume any other server software. This artice assumes you already have your server configured with a separate IP for each site.
It's simple really, you basically just need to edit your HOSTS file. In Windows XP it's located in:
C:\\WINDOWS\\system32\\drivers\\etc
I believe in Win-2000 it's
C:\\WINNT\\system32\\drivers\\etc
Or something similar, you get the idea. You can always search for HOSTS if you can't find it.
The basic format is this:
127.0.0.1 localhost
If you have KaZaA-Lite installed you'll see alot more entries which block the ads. All you need to do is add a line for each site you want to access, like so.
127.0.0.1 localhost
192.168.100.100 sitename
192.168.100.101 othersitename
Save the file, and that's it. You can now type sitename in your browser and it will point directly to the ip you entered in the host file.
If you don't have a network and still want to do this on your development computer, you can do it like so:
127.0.0.1 localhostAnd so on. I've only tested this method on Apache, but I'd assume it works with IIS too, assuming the sites are configured properly.
I'll be posting an article on configuring Apache and IIS for multiple site development soon.
Chris keyed this in on: 2003-10-11
Filed in: Web Development, Webserver, Windows