httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
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 http://mydomain.com/test.
>
> 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"
or
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.

Joshua.

---------------------------------------------------------------------
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