Ping respects hosts overrides - but browsers don't, in spite of DNS cache flushes
There are similar problems (i.e. https://superuser.com/questions/648133/why-is-chrome-ignoring-etc-hosts-on-os-x) here on the network.

One answer is to follow this bug which must be solved eventually.

People also mention the plugin HostAdmin to workaround this issue.