You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jon Block <ht...@collegepublisher.com> on 2003/07/24 22:26:08 UTC

[users@httpd] How to customize the directory listing denied?

I'm using the "ErrorDocument" to do a little bit of error handling. I have
my httpd.conf set like this:

<DirectoryMatch "C:/animals/dogs/poodle">
	ErrorDocument 404 /oops.cfm?message=darn
</DirectoryMatch>

This sucessfully calls my oops file at the root of the virtual host if any
documents are not found in that directory... like this
"http://www.example.com/animals/dogs/poodle/iofsdiofd.html".

I want to do something similar if somebody tries to access a directory
listing. I have the ability to view directory listings turned OFF, and when
you request my site like this:

http://www.example.com/animals/dogs/poodle

You get the directory listing denied message. How can i set apache to call
my "oops.cfm?message=darn" file like I did in the previous example if
someone tries to hit the directory listing?

Thanks!!
Jon


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


RE: [users@httpd] How to customize the directory listing denied?

Posted by Jon Block <ht...@collegepublisher.com>.
thanks!

-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Thursday, July 24, 2003 4:40 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] How to customize the directory listing
denied?



On Thu, 24 Jul 2003, Jon Block wrote:
> You get the directory listing denied message. How can i set apache to call
> my "oops.cfm?message=darn" file like I did in the previous example if
> someone tries to hit the directory listing?

Use ErrorDocument 403.

This will catch any case where the server denies access, not just for
directory listings.

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



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


Re: [users@httpd] How to customize the directory listing denied?

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 24 Jul 2003, Jon Block wrote:
> You get the directory listing denied message. How can i set apache to call
> my "oops.cfm?message=darn" file like I did in the previous example if
> someone tries to hit the directory listing?

Use ErrorDocument 403.

This will catch any case where the server denies access, not just for
directory listings.

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