Entry
I am hosting my website at an ISP using Apache. How can I block the listing of directory content?
Oct 31st, 2001 23:28
Neil Hamilton, Jad Bite, http://httpd.apache.org/docs/mod/core.html#options
Two methods:
1. If your ISP has enabled Indexes in the AllowOverride settings for
the server in question, you can do this by creating a .htaccess file in
the root of the directory concerned, containing the following line:
Options -Indexes
This will preserve all the other settings the ISP has set for your
site, but disallow directory indexes. See
http://httpd.apache.org/docs/mod/core.html#options for more details
2. If method one doesn't work, there's always the quick and dirty fix
of putting an index.html file in the directory concerned. It doesn't
have to contain any data, but it will stop people seeing a listing of
your directory.