04May2011
Disable Directory Browsing Thumbnail

Disable Directory Browsing

A tutorial to disable directory browsing with an htaccess file. Note htaccess files only work on a Linux server

Your ads will be inserted here by

AdSense Now! Lite.

Please go to the plugin admin page to paste your ad code.

A tutorial to disable directory browsing with an htaccess file. Note htaccess files only work on a Linux server

Letting people snoop around your directory’s that don’t have an index file in them can lead to security vulnerabilities. thankfully their is a simple solution to this problem by using an htaccess file.

By disabling directory browsing a user would see a forbidden page rather then the files inside that directory.

Your ads will be inserted here by

AdSense Now! Lite.

Please go to the plugin admin page to paste your ad code.

To create an htaccess file open notepad or any plain text editor and save the file as .htaccess, if using notepad make sure the file type is set to all files or you will create a txt file.

on the first line put an hash symbol ‘#’ which enables you to put comments in the file. Then use the command Options -indexes which will disable directory browsing.

The final file will look like this:

#disable directory browsing
 
Options -indexes

Save the htaccess file in the root of the server or in the directory when you want to disable directory browsing.

Your ads will be inserted here by

AdSense Now! Lite.

Please go to the plugin admin page to paste your ad code.

Author
Dave

About the Author

has written 72 articles on Dave is my name.

My name is David Carr I'm a PHP web developer based in Hull it is my passion to design and develop clean, accessible and usable websites using PHP and other web technologies, I'm an avid Twitter user why not follow me? https://twitter.com/daveismynamecom

Visit this author's website   ·   View more posts by

Sharing is caring.
  • Subscribe to our feed
  • Share this post on Delicious
  • StumbleUpon this post
  • Share this post on Digg
  • Tweet about this post
  • Share this post on Mixx
  • Share this post on Technorati
  • Share this post on Facebook
  • Share this post on NewsVine
  • Share this post on Reddit
  • Share this post on Google
  • Share this post on LinkedIn

Discussion

No responses to "Disable Directory Browsing"

There are no comments yet, add one below.

Leave a Comment