Or, if apache, you could deactivate the directory listing at all.
It would prevent it without needing to put a blank file everywhere.
http://httpd.apache.org/docs/2.0/mod/core.html#options
Simply add a section like this:
Code:
<directory />
options -indexes
</directory>
in a .htaccess in the root directory would disable server generation of a list of files in any directory. A 401 - forbidden will be returned.
Warning: the default value of options, if not specified, is "all", so by adding just -indexes, you deactivate all the other.
You must add them (with a +name_of_option) to enabled them back.
I would usually use this:
Code:
options -indexes +ExecCGI +FollowSymLinks +Includes
__________________
Listen to the ducky: "This is awesome!!!"
|