How to disable directory browsing?


Hi, I have a directory that I want to disable directory browsing. I tried to FTP .htaccess file containing the one line;

Option -Indexes

into the folder, but everytime I FTP it over, it seems to get erased when it copies over?

I mean, I tried copying the file over as test.htaccess and then renaming it once it gets copied over, but it gets deleted immediatly?

… is there an easier way to turn off directory browsing for a specific directory?

Thanks in advance!


It’s not getting erased. Filenames that begin with a period are considered “hidden”. You need to configure FTP client to “view hidden files”

:cool: -//-


Not certain of your syntax.
My .htaccess entry for same is:

Options -Indexes



Thanks for your help. I enabled “view hidden files” on my FTP client(FireFTP plug-in for FireFox) and I see that the file does not exist. I tried again copying a test.htaccess and renaming it and this time, it worked!


Thanks for your reply. Your suggestion combined with Atropos7 has got me to get the behavior that I wanted.