225 users online (0 members and 225 guests)  

  Results 1 to 3 of 3
  1. #1
    Boballoo's Avatar
    New User

    Join Date
    Mar 2007

    Why use index files in every directory?

    I use a program (Guardian) to send me notifications when an error occurs on my site (404, 403 etc.) These notices contain the URL causing the error and the referring URL. Lately I have been getting numerous notifications with URLs to directories without index files (On a side note, these URLs also contain within them, urls to other sites. I assume this is some spammer technique and I am not too concerned about this in this post but if someone can shed some light on how/why they (the spammers) do this I would appreciate it.)

    My purpose in posting here is to find out about the use of index files in directories. I have read that this is a good idea, but I have yet to hear why except that in case someone navigates to the URL of the directory rather than the actual page URL, then they will not get a 403 error message, but this seems like a rather weak reason to me. Is there another reason? SEO reason? Technical reason?

    If I find good reason to do this, is it enough to just put a blank index file in each directory? If so why? What purpose does it serve (aside from thwarting the spammers doing what I described above.) Thanks in advance for your help.

  2. #2
    HTML's Avatar

    Join Date
    Aug 2000

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel

    Re: Why use index files in every directory?

    if you do not have a blank index file the user will be see a list of all files in your directory and will also (possibly)be able to navigate to other sub-folders and see all the files in those directories. Some of the files that the users will see may contain sensitive information.

    AHFBWEB Less customers per server, more power for you!

    Business Class Shared Hosting

  3. #3
    vinyl-junkie's Avatar

    Join Date
    Sep 2005

    Re: Why use index files in every directory?

    If you're on a Unix server, you don't need to have blank index files at all in your directories. Just create a .htaccess file and put the following code in it:

    Options -Indexes
    When anyone tries to access the contents of a directory that doesn't have an index file, they'll get a 403 error.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

Tags for this Thread