Block Visitors From Viewing Directory Indexes

By .     1 Comment

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.

Posted in: Web Development

is the site owner of Computer Tech Tips and is passionate about computer technology, particularly Windows-based software, malware removal, and web development. He enjoys helping people troubleshoot computer problems and providing technical support to family, friends, and people around the net. Xps wrote 79 article(s) for Computer Tech Tips.

 Subscribe to comments: this article | all articles

Comments (1)

  1. […] This article can be seen in full at its permanent location. Click this link to read the whole articl… […]

Comments are automatically closed to prevent SPAM.