Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: preventing directory browsing

by vladb (Vicar)
on May 02, 2003 at 04:27 UTC ( #254898=note: print w/ replies, xml ) Need Help??

in reply to preventing directory browsing

Dropping a blank index.html file in each of the directories should work. Try placing one at the top of your directory tree and it'll 'hide' any directories below (by not allowing a client to see them in the first place). One would have to do a darn good guessing job in order to get to the lower directories ;-)


# Under Construction

Comment on Re: preventing directory browsing
Download Code
Re: Re: preventing directory browsing
by db2admin (Acolyte) on May 02, 2003 at 04:59 UTC
    Thank you very much for your suggestion.

    David K.

Re: Re: preventing directory browsing
by fsn (Friar) on May 02, 2003 at 09:18 UTC
    Yes, but....

    Beware that you will only hide the directories on the same level. If you link to any object on any other level, the user doesn't have to guess directories any more, and he can browse at least a subtree. Put empty index.html-files (or even perhaps with redirects) everywhere.

    If you're on an apache server, and it's configured to read .htaccess files, you can use it to turn off browsing for an entire subtree (if I remember correctly). However, what you can do with an .htacces-file depends on the server setup, so you have to ask the server administrators. Read all about .htaccess in this tutorial.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://254898]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2015-03-27 07:01 GMT
Find Nodes?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:

    Results (599 votes), past polls