
-----------------------------------
agnivohneb
Sat Mar 03, 2007 8:57 pm

autoindex
-----------------------------------
I'm not sure if anyone on this site knows anything to do with Apache but I'm gonna ask anyway.

I want to disable autoindex (mod_autoindex) in a certain directory (+ sub dirs) on my site. In other words I want to ban direct access to that directory but still be able to view the files in that directory. I don't want to add a index.php file to each one that redirects them away or tells them they can't access this. I want to do it with one file only (.htaccess).

Is there any way I can do this. Any help would be really appreciated.

Thanks a lot
agnivohneb

P.S. I'm running apache 2.2.

-----------------------------------
rdrake
Sun Mar 04, 2007 1:27 am

RE:autoindex
-----------------------------------
There is but one way to accomplish this easily.  That is the add the following to .htaccess.  It will stop directories from being listed (403 error if somebody tries), and let files that are directly linked to be viewed.Options -IndexesI had to do the same thing to keep those curious fellows in the channel out of my stuff ;-)..

-----------------------------------
Clayton
Sun Mar 04, 2007 9:40 pm

Re: autoindex
-----------------------------------
hmm... I was wondering about that :P

-----------------------------------
agnivohneb
Sun Mar 11, 2007 8:04 pm

Re: autoindex
-----------------------------------
Thanks a lot rdrake.
