httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Peltzer <>
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:

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

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

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message