This is a pretty neat hack. Block ads regardless which browser you’re using by redirecting their domains to your local computer.
Since my mac has a local web server running, I got error messages instead of ads. So I also added a line to my mac’s local apache config file so that I wouldn’t get a 404 error message all the time. I just edited /etc/http/http.conf and inserted the following line towards the end:
ErrorDocument 404 "Blocked
You can get a hosts file that includes a huge list of ad servers and learn more about how to do it at the link above . You might even be able to make use of the list for Firefox’s AdBlock plugin..