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.
In the directory that you want to disable directory listing, create the .htaccess file that contains:
You can also done by
Reference: visit here