I've modified the HOSTS file on my Windows 7 machine in exactly the same manner as I have in the past on my Vista and XP machines; however it has had no effect.

How do you redirect URLs in Windows 7 or enable the HOSTS file so that it acts as it did in the previous versions of Windows?

link|improve this question

Please post your hosts file – John T Sep 26 '10 at 21:02
Can you give a specific example? What is the configuration, what steps do you take to test it, what do you expect to happen, and what actually happens? – Stephen Jennings Sep 26 '10 at 23:41
I second post your hosts file. Also try the hosts file on the XP machine where the other hosts file works. – Andrew J. Brehm Nov 22 '10 at 9:37
feedback

4 Answers

up vote 2 down vote accepted

Totally forgot about this open question. As it turns out, if you copy the contents of the file, paste it into a new Notepad, delete the original file, and then save HOSTS again to C:|Windows\System32\Drivers\etc then it works.

link|improve this answer
feedback

Have you tried running an IPCONFIG /Flushdns?

It may be that Windows 7 caches the lookups in a different way to older versions, leading to slightly different behaviour.

link|improve this answer
Yes, I've tried that amongst many other things. I've currently NO idea why the HOSTS file seems to be completely ignored in W7. – Sootah Sep 26 '10 at 22:42
feedback

It might have another hosts file in \wiindws or \windows\system32 ? Maybe it is getting the first one he find... (?)

link|improve this answer
feedback

According to Microsoft, the DNS resolution order has not changed.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.