How to disable files listing in directory on website directory?

KeyserSoze

Diamond Member
Oct 11, 2000
6,048
1
81
For example, in my "images" directory, the user can go to 'mysite.com/images', and have a directory listing of all the image files there.

How do I disable that? Anyone kno?

Thanx.




KS
 

NikPreviousAcct

No Lifer
Aug 15, 2000
52,763
1
0
Try creating an empty file called "index.html" and putting that in the directory for a quick fix until you learn how to manage your webserver :thumbsup:
 

itachi

Senior member
Aug 17, 2004
390
0
0
if the server is running apache.. make a file called .htaccess and put 'Options -Indexes' in it.
if it's running off a windows service.. you can set up the ntfs access rights.

this'll make it so even text-based http clients won't be able to list the directory contents.
 

delroy

Senior member
Nov 6, 2002
240
0
0
Yeah , its pretty much server dependent,

Options -Indexes,
ntfs access rights,

depends on what you have