Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to map 'localhost' to an IP address elsewhere on the network, say '' for example. I've tried editing my hosts file, changing the entry from:   localhost

to    localhost

with no luck. The closest I've gotten is using DNS spoofing via Charles. Adding a DNS spoof entry mapping the host name 'localhost' to '' works fine in Firefox, but fails in Internet Explorer, basically showing IE's 404 page. I'm wondering if there's some specific setting or way I can get DNS spoofing to work in IE?

The main issue I'm trying to resolve is that our development environment points to 'localhost' and rather than setting the dev env up in a legacy Windows laptop to try and debug, point to a server that has it all setup and I can make the changes remotely.

share|improve this question
I wouldn't point localhost away from because I have no idea what you'll break, but I bet it will be a nontrival amount of stuff. YMMV of course. – Fred Apr 24 '10 at 22:16

As far as I know it's not possible to remap localhost, since it's part of the TCP/IP stack, also a lot of things depends on this setting and I would break almost everything network related. If you can provide a little more of insight about what you are trying to achieve I may be able to help you. For example you could set up a small apache server (XAMPP for example) and set an htaccess redirect to the other ip.

share|improve this answer
This seems to defeat the purpose of a config file :( It works fine on Win7, but not XP for me. – Aram Kocharyan Aug 3 '13 at 4:01

There is a way to forward specific port of any IP address to another with PassPort: I think it would be enough for you to add 80 port.

share|improve this answer
Only solution to work on Win XP. – Castrohenge Sep 16 '13 at 11:58

You can use this nifty utility

Use 80 for port, and add IP and port of the machine you want it to forward to. Open your browser (tested in FF and IE8) and it should just work.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .