View Single Post
Old 2006-07-14, 07:54 PM   #14
Simon
That which does not kill us, will try, try again.
 
Simon's Avatar
 
Join Date: Aug 2003
Location: Conch Republic
Posts: 5,150
Send a message via ICQ to Simon Send a message via AIM to Simon Send a message via Yahoo to Simon
Yes, it could be a security issue if you have things in those directories and subdirectories which you don't want the world to see. But aside from that, it's a waste of potential ad space.

If you don't already know how to set your default page, my guess is you can just tell someone at your hosting company and they will set this up for you.

First thing you can tell them is that you want to deny directory listings completely on your domain(s)/server.

To do it yourself you need to do make changes to your .htaccess file (or create one if there's none there already).

I believe you need to have this in your .htaccess file to prevent directory listings:

Options -Indexes

If you're working on an already-existing .htaccess file, look for "DirectoryIndex" and see what's listed there. You may see something like this:

DirectoryIndex index.html

If that's all that's there, or if it's missing completely, here's another example of what the line could say:

DirectoryIndex index.html index.htm index.shtml index.php

What that does is tell the server what to do when someone requests, for instance, this address from the earlier example:

http://www.route2x.com/sub/ammom140706/

The DirectoryIndex line tells the server to look in the ammom140706 directory for these files, in this order: index.html, index.htm, index.shtml, or index.php

Basically it reads them from left to right on the DirectoryIndex line.

You can use whatever file names you want, those were just my examples. But if you had that line in your .htaccess file that controls those directories in the examples above, a surfer would have gotten served your index.htm page instead of seeing your directory listings.

If I lost you along the way, it's probably best to hit up your hosting support guys and tell them what you want to achieve. Most likely they can set this stuff up for you pretty quickly.
__________________
"If you're happy and you know it, think again." -- Guru Pitka

Last edited by Simon; 2006-07-14 at 07:57 PM..
Simon is offline   Reply With Quote