How to show a directory listing on a website

BlakkIce

Golden Member
Jun 29, 2001
1,073
0
0
i couldnt find an example but ill explain it best i can, does anyone know how to create a web directory when the address is like http://www. something.com/test/, and then it will show all the files in that folder or directory, anyone know how to do that?
 

kt

Diamond Member
Apr 1, 2000
6,031
1,346
136
It's a server configuration. The webserver needs to be configured to allow directory listing and you should not have any recognizable default loading index page in there (ie: index.htm, index.html, etc.)
 

Bullhonkie

Golden Member
Sep 28, 2001
1,899
0
76
If the web server is configured to disallow index listing, you should be able to override it yourself for any particular directory. Make a plain-text file named .htaccess in the directory you want to list the contents of (if it doesn't already have that file there), and put Options +Indexes in the file.
 

kt

Diamond Member
Apr 1, 2000
6,031
1,346
136
Not if the webserver is configured to disallow .htaccess as well.
 

Bullhonkie

Golden Member
Sep 28, 2001
1,899
0
76
Originally posted by: kt
Not if the webserver is configured to disallow .htaccess as well.

True. I was going to add that as a disclaimer at the end of my post but I didn't think it was necessary. Depends on who your webhost is, if it's a cheapo/free place like Geocities you probably won't have much control over anything. :p
 

Confused

Elite Member
Nov 13, 2000
14,166
0
0
If you're running ASP on the server, then download this file (right click, save as) and put it in every folder you want to display the contents of. (You can change the file to index.asp if your server is set to use index.asp as a default document :))


This was something that Soni from here on the forums wrote for me, when I was using IIS/ASP on my own little server :)


Let me know if this works for you :)


Confused