TechSpot

Load websites w/o index.html ?

By Starfox00000
May 19, 2007
  1. I was just wondering if anyone knows if its possible to load a dir of the files on a site (as if there were no index.html) when there is an index.html. I heard that an old version of netscape could do this, but couldn't find out which version. If anyone knows thx in advance.
     
  2. jobeard

    jobeard TS Ambassador Posts: 9,322   +622

    I think your asking if you can have a webserver directory which does not have
    the index.html file present.

    Yes you can -- the webserver, if properly configured will display a tree view
    of the files in that directory -- much like an GUI-FTP view.

    btw: the server can also be configured to look for other types of default pages,
    index.phtml, default.html, and even default.asp (on an IIS server).
     
  3. Nodsu

    Nodsu TS Rookie Posts: 5,837   +6

    He wants the directory listing, even though the index is present.

    No, unless the server is seriously misconfigured, you cannot do it. One can always find a security hole and exploit that of course..
     
  4. jobeard

    jobeard TS Ambassador Posts: 9,322   +622

    it's actually quite simple to generate a list
    Code:
    [B]ls [COLOR="Red"]ZZ[/COLOR] | awk ' {print "<a href=\"" $1 "\">" $1 "</a><br> \n"} '>theDirList.html[/B]
    
    if the browser were to access dirname/theDirList.html, the user would
    see a simple list of links to the file names

    optional values to use in place of ZZ
    * would list all files
    *.html would list only html files (specifically in lower case
    *.{html,HTML} list all html files in both cases
    *.jpg list all jpeg files in lower case
    *.mov list all quicktime movies

    such a script could be entered manual on a telnet or SSH session
    or wrapped into a shell script and launched any time by direct reference
     
Topic Status:
Not open for further replies.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...