Results 1 to 3 of 3
Related
-
Counting files and Reading filenames from a specified directory in JS Forum: Javascript Forum
Replies: 5 -
Replies: 2
-
Replies: 2
-
Large upload files causing parent directory to be deleted Forum: CGI Perl Forum
Replies: 0 -
listing files in a directory on a web server and replace one when selected Forum: Javascript Forum
Replies: 17
-
03-14-2008, 12:48 AM #1
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.
-
03-14-2008, 06:22 AM #2
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.
dave
-
03-14-2008, 08:12 PM #3
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:
Code:Options -Indexes
Music Around The World - Collecting tips, trade
and want lists, album reviews, & more