.htaccess

sorry, couldnt find a more suitable topic.

How do I turn off directory listings using .htaccess :)

Hello,

Type this in Notepad and name it: .htaccess

Options All -Indexes

Note: the ".htaccess" file must contain each command on a separate line so if you already have some commands on your file use [RETURN] and type the above code in a new line :idea:

thanks dudeh, although it dont work wif my apache on my PC :(

any suggestions?[/url]

Well, there are two ways:

You can just put a blank file named index.html in that directory. OR
a "more correct" way is to put a file named .htaccess in that directory consisting of only this line:

Options -indexes

What's especially nice about doing it this way is all sub-directories of that directory will also get their directory listings turned off.
You could then turn on indexes for one of those sub-directories just by making a .htaccess file in that directory with:

Options +indexes

This is the standard way of doing it, it works for me and many others...