For some time now, each time I typed localhost on Firefox it tried to open www.localhost.com, but accessing 127.0.0.1 worked just fine.
I was lazy about fixing it, but today I got pissed off and decided to find out what the hell was happening.
After googling a little bit I found this forum post: http://www.wilderssecurity.com/archive/index.php/t-198020.html
It happens because of Firefox and Vista's IPv6 support. I'm not sure why it happens, but there are 3 easy solutions:
- Remove the IPv6 entry for localhost in the windows hosts file (explained bellow).
- Disable Firefox's IPv6 support.
- Disable Vista's IPv6 support.
As I don't use IPv6 at all, my choice, is the quickest and dirtiest one: remove the entry from the hosts file.
To do it, just do the following:
- Open notepad as Administrator and edit the file: C:\Windows\System32\drivers\etc\hosts
- Remove the line: ::1 localhost
- Save the file.
- Open up the command prompt as Administrator (hit the windows key, type cmd and then hit Ctrl + Shift + Enter)
- Execute the command: ipconfig /flushdns
- That's all folks :)
I don't know why Firefox tries to open www.localhost.com, but if you are asking yourself what is "::1 localhost", it is the IPv6 equivalent of 127.0.0.1, you can read more about it at the Localhost's entry at wikipedia.
16 comentários:
I've done all the steps you suggest in your article and it works for whatever reason until I reboot. Any ideas on how to get these changes to stay forever?
After you reboot the line is back on the file?
Maybe windows or some application is putting it back there, but I have no Idea why this is happening, sorry.
Ok this has been here for a while, just wanted to say thanks, I too ignored it for a 3 months. Got pissed off and you cleared it in 5 mins.
well, instead of removing the "::1 localhost" line, I just added "127.0.0.1 localhost" and it works very well. This way I did not deactivate IPv6.
Thank you very much!.
Thanks for this, tried other about:config settings, but this one worked for me.
Thanks a lot!!!!
this was driving me mad, this solved it in 2mins tanks a lot
Many thanks it's solve my problem by disable firefox IP V6
#2 dan #3 don't work. #1 works beautifully. thanks :)
Thanks.....!!!
It's work !! thank a lot
P'tin trop de la balle ! Félicitations ! ça marche nikel grave de la bombe à sa mère ! tip top koi...
Merci ! Alain Voute (06100 - FRANCE)
ok this gets a bit tricky but if you are using iis 6-7 i found
some times when switching between Development environments ...eg IIS and Wamp ...you need turn off IIS
but some times when you restart IIS
"manage web site" does not get restarted just click on the default website in iis ...on the right you will see manage website ...restart or turn off
This is one of the awesome and good post.I like your blog inspiration.This is one of the suitable post.
thanks, Sir .... :) ~(^-^)~
Postar um comentário