IE looks up "localhost", others don't

symphonix

Scratch & Sniff Committee
I ran into a little hiccup while experimenting with CGI scripting, and thought I would point this out as it would be useful info to anyone using "localhost" and the Apache server to test web-pages or CGI while offline.

I was testing my site offline with different browsers, and could not work out why IE was the only one that could not access the page. I was using the "localhost" address and this worked as expected in Netscape, Mozilla, Opera and OmniWeb ... but not in Internet Explorer.

Internet Explorer will attempt to lookup "localhost" via DNS. If you aren't on a network at the time, it will return a site not found error. You can get around this by pointing it directly to the IP address 127.0.0.1...

It was a simple little mistake, but it took me a while to pin down what I was doing wrong. Hopefully this saves someone else a headache.
 
Back
Top