hosts files do not perform aliases. They only do IP-to-name mappings. So the way some block ads is to point the server to 127.0.0.1 (or any other 127.x.y.z IP for that matter):
Code:127.0.0.1 www.adserver.com
You have that backward. Anything looking for localhost wouldn't be able to resolve it to 127.0.0.1. Anything connecting directly to the IP of 127.0.0.1 will work without the hosts file entry, as it is going directly to the IP.
This is there by default, so it's weird that yours had those lines removed.
Ha, I thought I had the concept down pat. I was also going by the lines I found in my hosts file (basically hundreds of "adserver.com localhost" lines) which seemed to suggest that they just redirect any requests into a blackhole.
And that second part makes sense a lot more sense when it's the other way around, I thought as I was writing that it didn't sound right.
Well, there you go, learn something new everyday. Thanks for clearing that up so quickly.
And I don't know why that line was missing, maybe in some distant past I had messed it up (because it had the line "localhost localhost" and no "127... localhost").