Force HTTP 403 error when there is no index file
If you want to display HTTP 403 error (instead of files list) for folder, where there is no index.html
or index.php
file, then in .htaccess
file you must add following line:
Options -Indexes
This works for current folder and all subfolder (unless .htaccess
file if any of these subfolders will “locally” change this setting).