Block Visitors From Viewing Directory Indexes
Adding blank index.htm
files to all your website directories in effort to keep nosy visitors from viewing all the files in a directory is an annoying chore. You have to check each directory and upload an extra file per directory, so you end up wasting time. Fortunately, there is an easy, 1-shot deal if you create a .htaccess
file in your website’s root directory. Add the following line to the .htaccess
file:
Options -Indexes
A user who opens a directory that doesn’t already have an index file will get a 403 Permission Denied message instead of viewing an index of all your files.
Comments are automatically closed after a period of time to prevent SPAM.
Recent Comments