I have a local webserver running that I would like access as myserver.localhost, so I added an entry
127.0.0.1 myserver.localhost
to C:\Windows\System32\drivers\etc\hosts
. This worked fine.
Then something happened. Among others, I had to disable Windows User Access Control, but I doubt that that is the cause. Now the system does not react to changes in the hosts file anymore. I commented out the entry, added new test entries, flushed the DNS cache several times, rebooted the machine, went for a break, nothing helps.
nslookup still returns 127.0.0.1 for myserver.localhost and non-existing domain for any test entries I add. To me it seems the file itself is broken in some way (it's just a text file, but anyway...) and Windows fails to work with it and therefore just returns whatever it thinks was the last good result.
Does anyone have an idea how to get back to a working hosts file without re-installing the entire system ?