Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 autoindex
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
agnivohneb




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
rdrake




PostPosted: 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.
code:
Options -Indexes
I had to do the same thing to keep those curious fellows in the channel out of my stuff Wink..
Clayton




PostPosted: Sun Mar 04, 2007 9:40 pm   Post subject: Re: autoindex

hmm... I was wondering about that Razz
agnivohneb




PostPosted: Sun Mar 11, 2007 8:04 pm   Post subject: Re: autoindex

Thanks a lot rdrake.
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: