httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
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;

     ServerAdmin nobody@example.com
     ServerName nowhere.example.com
     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: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