Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14611 reviews 1734 hosting providers

Questions & Answers

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

Mar 26, 2012 by Dan_31
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 votes
Mar 26, 2012 by mike231
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 votes
Mar 26, 2012 by FixHost
if you make a blank index.html file inside your folder, directory listing will be prevented.