Author |
Message |
agnivohneb
![](http://compsci.ca/v3/uploads/user_avatars/13633306154a6e6befc7b53.png)
|
Posted: Sat Mar 03, 2007 8:57 pm Post subject: 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. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
rdrake
![](http://compsci.ca/v3/uploads/user_avatars/113417932472fc6c9cd916.png)
|
Posted: Sun Mar 04, 2007 1:27 am Post subject: 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.I had to do the same thing to keep those curious fellows in the channel out of my stuff .. |
|
|
|
|
![](images/spacer.gif) |
Clayton
![](http://compsci.ca/v3/uploads/user_avatars/1718239683472e5c8d7e617.jpg)
|
Posted: Sun Mar 04, 2007 9:40 pm Post subject: Re: autoindex |
|
|
hmm... I was wondering about that ![Razz Razz](http://compsci.ca/v3/images/smiles/icon_razz.gif) |
|
|
|
|
![](images/spacer.gif) |
agnivohneb
![](http://compsci.ca/v3/uploads/user_avatars/13633306154a6e6befc7b53.png)
|
Posted: Sun Mar 11, 2007 8:04 pm Post subject: Re: autoindex |
|
|
Thanks a lot rdrake. |
|
|
|
|
![](images/spacer.gif) |
|