homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Is this the best way to protect directory's contents from being listed

 6:27 pm on Aug 3, 2009 (gmt 0)

What I'm using now is a line inside the htaccess file:

IndexIgnore *

This prevents people from viewing the listings of directory if it doesn't have an index file inside... which the "images" dir doesn't have for example. Yeah I know I can always add an index file, but it just seems artificial to me.



 8:06 pm on Aug 3, 2009 (gmt 0)

You could use

Options -Indexes

to return a 403-Forbidden response to all directory requests unless that directory contains an index file.

This would prevent not only the files in the directory from being viewed, but also the directory itself.

I don't feel it's greatly better than what you've got, just a different method.



 6:12 pm on Aug 5, 2009 (gmt 0)

Thank you very much... yet again!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved