httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: [users@httpd] Return error code for a <Location>
Date Mon, 21 Jan 2008 02:31:08 GMT
William A. Rowe, Jr. wrote:
> Phil Endecott wrote:
>> Dear experts,
>> I was half-expecting to find that there was something like this:
>> <Location />
>>   ErrorCode 404
>  > </Location>
> Redirect 404 /
> alone should probably do it, no?

Checked; that should do it.

I'd take it a step further;

     DocumentRoot /path/to/htdocs
     CustomLog /dev/null common env=never-log
     LogLevel crit
     KeepAlive Off
     Redirect 404 /
     ErrorDocument 404 "The requested server is not found."

giving away nothing in the responses, and wasting no time or space for
recording garbage queries.  The only 200 OK response would be in reply
to an OPTIONS *, which is harmless and reveals nothing interesting.

Some sites have a special 404 page to inform users that a modern browser
is required (e.g. help those which don't provide Host: headers) but that
issue is so ancient it's hardly worth it.

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