Deny directory listing on your blog/site

Directory listing might be harmful to your site because others can browse and download all files in your directories. Preventing this problem is less than easy with 2 basic ways:

  1. Use blank index file: In most case, your web server will load the file named index.html in a directory by default when it’s called by the browser. So just upload a blank index.html to the directories which you don’t want to be listed. After that, your server will response a blank page instead of listing that directory when it’s called.
  2. Use .htaccess file: upload a file named .htaccess which contains only: Options -Indexes on your root directory. If you already have a .htaccess with other contents in it, simply edit and add 1 more row like above. All your directories are inaccessible from now on, a 403 page will be shown instead.

,

  1. #1 by scoormedo on December 13, 2008 - 7:33 pm

    Hi!
    My name is Jessika!

  2. #2 by Hieu Trung on December 13, 2008 - 11:19 pm

    Hi, nice to know you.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>