How to prevent web users from being able to list the content of a directory?

Hi,

I have a PHP application residing on a server. The PHP source files are stored in directories and sub directories. I would like to make sure that the web users CANNOT list the content of these directories containing the source files.

I saw some .htaccess files in the httpd.conf file. But I don't know how to use them, nor if they are the answer to my problem.

Any idea?

Stephane/Stockholm

stephaneeybertAsked:
Who is Participating?
 
svsConnect With a Mentor Commented:
Turn 'Indexes' option off -- server-wide or locally.  
(See description of 'Options' configuration file directive
for more information.)
0
 
stephaneeybertAuthor Commented:
You should post a comment instead of an answer, so that others would have the possibility to participate in this exchange of suggestions.

0
 
stephaneeybertAuthor Commented:
Have you a running example of your suggestion?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.