Forum Moderators: phranque

Message Too Old, No Replies

Simple htaccess question

         

nolanpro

9:07 pm on Aug 24, 2006 (gmt 0)

10+ Year Member



Sorry I'm kind of a noob.

I figured out how to block directory file listings using Options -Indexes but it leaves the directory with a blank page. I would like to show something in the direction of "Sorry, you cant view the directory listing". (like how I can edit my own 404).

Anyone know how to do this?

Thanks!

jdMorgan

1:02 am on Aug 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Simply delete the index page(s) in that directory.

The result for subsequent accesses should be the default 403-Forbidden response, however you have that configured.

To display a custom error page for 403 errors and others, see the Apache ErrorDocument directive [httpd.apache.org].
...and please carefully read the fine print in there about the form of the ErrorDocument URL-path, and save yourself the grief of a very common problem. :)

Jim