Monday, April 28, 2008

Disable Directory Listings in WordPress

By default when accessing any directory which does not contain an index file, a directory listing will be shown displaying a list of the files in that folder. Web servers can be configured to automatically display the listings of the contents of a web site's file directory if no index file (i.e. index.html or index.php) is present. This can expose files and information to visitors.

Simply adding a blank/ 0 byte text file named "index.html" will prevent this directory list from being displayed, however another way to disable directory listing is by adding the following line to the .htaccess file in your public_html folder of your web hosting account :

Options -Indexes

That’s it, with this line in place, folders which do not contain index files will no longer show the default directory list.

3 comments:

  1. christine mendozaMay 18, 2008 at 3:50 PM

    Christine Mendoza is the most stunning model in the industry today. She is the hottest Asian Model I've ever seen. Christine has got the perfect body, the perfect style and a perfect face. I will keep posting her latest videos and pics on my lens, so just stay tuned and read on!!!

    ReplyDelete
  2. I'm loving it, really good work you've done here. I just wanted to say thanks for sharing directory.

    ReplyDelete
  3. wordpress is good for blog ,I also use the blog which is base on wordpress

    ReplyDelete