How to prevent visitors from accessing subfolders and admin php files on my website?

142 views
asked Mar 26, 2012 in Graphic Design by Dan_31 (910 points)
Hi all,

I have a website and I was told by some visitors that they can easily access subfolders and admin PHP files easily. How can I prevent that?


thank you

2 Answers

0 like 0 dislike
answered Mar 26, 2012 by mike231 (2,480 points)
hey dan,

add the line "deny from all" to .htaccess file in the root public_html folder and it will apply to all subfolders. This will do it for sure.

good luck
0 like 0 dislike
answered Mar 26, 2012 by FixHost (12,380 points)
if you make a blank index.html file inside your folder, directory listing will be prevented.
...