httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Peltzer <goochru...@gmail.com>
Subject [users@httpd] redirect all requests to /dev/null
Date Fri, 31 Dec 2004 18:23:05 GMT
Hi.  I'm using Apache/1.3.33 (Darwin), installed via fink.

I had heard somewhere that online adverts could be blocked by use of
/etc/hosts, so I added a few lines to my /etc/hosts file:

127.0.0.1 ad.doubleclick.net
127.0.0.1 ads.osdn.com

Since apache is running on my machine, I now get either HTTP/404 error
messages, or root directory listings (my DocumentRoot lacks a default
page by design).  This is better than ads, but I know I can do even
better.

My idea is to route any requests originally to the hosts in /etc/hosts
to a special file, such as /dev/null or perhaps a 1x1 black image. 
I've tried a number of things with <VirtualHost .../> and
RedirectMatch and DirectroyMatch, but nothing works as desired, I
either continue to get HTTP/404s or I can't access my local sites.

Any ideas or pointers to similar setups?


-- Matthew Peltzer
-- goochrules@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message