httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Returning 404 depending on client ?
Date Tue, 04 May 2004 01:59:38 GMT

On Mon, 3 May 2004, Michael Gale wrote:
> 	I have a directory on my web server, for example called "test" which is
> available by
> Now I want to make this directory only available to a few external
> clients which I know is easy via a access rule, but I want to return a
> HTTP 404 error to all clients that are not allowed.

Why?  Seems like a security-through-obscurity sort of thing that isn't
going to help anything very much.

But there are several ways to accomplish this, assuming you are using
Allow/Deny rules to choose which clients have access.  One would be simply

ErrorDocument 403 "File not found"
ErrorDocument 403 http://path/to/not_found.html

Neither of these will actually return a 404 status code to the client.  If
you want that, you'll need to point the ErrorDocument at a CGI script
which can lie about the Status: code.


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