homepage Welcome to WebmasterWorld Guest from 54.237.235.12
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
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
westman7

5+ Year Member



 
Msg#: 3964823 posted 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.

 

jdMorgan

WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3964823 posted 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.

Jim

westman7

5+ Year Member



 
Msg#: 3964823 posted 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