How to access websites with different IPs but the same URL on the same computer for web development purposes

In developing a complex site you may find yourself needing a production, development and localhost website in order to separate changes appropriately.  If this is the case, you may also find yourself needing to use the exact same URL for each site.  In order to access your sites you probably have been changing the hosts file over and over again to switch which site you would access.  For example:

Syndicate content