How do you index a directory from a website?

beansbaxter

Senior member
Sep 28, 2001
290
0
0
How or what do you do to make it so that when an html page is displayed, it shows like an directory listing of all the files in that directory?

I see it on some website when they want to categorize and archive large amounts of files, but I dont know how to make a url not look for an index.html page but rather just list the dir contents...

Someone here is bound to know....any ideas or insight?
 

Ryoga

Senior member
Jun 6, 2004
449
0
0
If you point your web browser to a directory with no index.html, the default behavior is to display a directory listing.

For example, if you go to file:///c:\ you get a directory listing.
 

beansbaxter

Senior member
Sep 28, 2001
290
0
0
yes that will work, but how can you look at the contents of a directory on a server that you want to list off the files?

if you type the url name, it comes up as you dont have access to that server??? ive seen it done before, shouldnt be that hard.
 

Relayer

Diamond Member
Oct 30, 1999
3,424
0
76
you need to put an .htaccess file in the directory.

open notepad and paste the following

Options +Indexes


save this as .htaccess with not extension.
 

NikPreviousAcct

No Lifer
Aug 15, 2000
52,763
1
0
If you're running apache, just drop everything into a directory with no .htaccess file at all. Edit your config file to allow for directory browsing (or wtf ever it's called). Voila.