How to Disable Directory Browsing Using the htaccess Rule

The best way to increase the security of your web files is to disable directory browsing. To do this, add the following line to your .htaccess file:

Options -Indexes