Stop directory listings in Apache
Hi,
I am new to Apache. I have it up and running on Red Hat 9. I have a bunch of web sites on this system. How do I do this: 1. Prevent anyone from getting a directory listing of any directories under "/var/www/html" 2. If any directory does not contain an "index.html" file then my default "/var/www/html/nopage.html" should be displayed instead. Very often I change the contents of the "/var/www/html/nopage.html" file so I would like to maintain only one copy of this file. Thanks. |
Got to love the docs over at apache.org.. http://httpd.apache.org/docs/mod/mod_autoindex.html
|
you may put a index.php (or index.html) in the required deirectory which will redirect the user to some error page.
Apache site has this redirecting thing very well explained. I dont remember exactly where it is, 'cause I saw it as a tip while validating my web-site at validator.w3.org |
All times are GMT -5. The time now is 06:26 PM. |