How to stop site directory listing


If you create a folder in your site then don’t forget to put “index.html” file there, otherwise site visitor can see complete directory listing of all files and folders of that folder.

How to prevent

In .htaccess file in your site root directory , add the following line.

Options -Indexes

It will prevent visitors from directory listing of folders.

Advertisements

3 thoughts on “How to stop site directory listing”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s