.htaccess: How to disable directory listing?

How to disable directory listing using .htaccess? The webserver (Apache) should allow downloading files in a directory and child directories of it but forbid listing of the directory and child directories.

asked Jan 26, 2013 by anonymous

2 Answers

Best answer

In the directory that you want to disable directory listing, create the .htaccess file that contains:

Options -Indexes
answered Jan 27, 2013 by anonymous

You can also done by

Options -Indexes


IndexIgnore *

Reference: visit here

answered Jun 23, 2014 by guruparthi (140 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost