How to close open parent directory

Discussion in 'Web Design and Development' started by Millwood, Mar 15, 2007.

  1. Millwood macrumors regular

    Joined:
    Jul 15, 2006
    Location:
    NY/NY
    #1
    While thinking of designing my own site, i've been surfing around the web and notice a lot of open parent directories on different websites. (They tend to have two links: parent directory and a cgi-bin/) How do you close them so that when you go to the home address, it just goes to your homepage instead of the parent directory?
    Keep in mind i'm kinda new to this stuff, so if anyone can offer an advice.
    Thanks.
     

    Attached Files:

  2. rogersmj macrumors 68020

    rogersmj

    Joined:
    Sep 10, 2006
    Location:
    Indianapolis, IN
    #2
    It depends on how your web server is configured. By default, most servers look for these files in a directory to serve as the default page when you don't specify one (these are not necessarily in order of priority):

    index.htm
    index.html
    index.php
    index.php3
    index.php4
    index.php5
    index.asp
    index.cfm
    ...
    etc, etc. Most of those also work with "default" instead of "index". So make yourself a file called "index.html" and stick it in your root directory, and that's the file people will see when they visit your domain.
     
  3. Millwood thread starter macrumors regular

    Joined:
    Jul 15, 2006
    Location:
    NY/NY
    #3
    thanks for the reply. I think I understand now.
    Just another quick question regarding naming web pages, does it matter what I name them after index.html or will it understand once I link off of the index pages?
     
  4. rogersmj macrumors 68020

    rogersmj

    Joined:
    Sep 10, 2006
    Location:
    Indianapolis, IN
    #4
    You can name files whatever you want, and link to those files. But if you only want to link to a directory, e.g. http://somedomain.com/products/, then you had better have an "index.html" or other default equivalent in that /products/ directory.
     

Share This Page