Do not allow public viewing of directory indexes


/ Published in: PHP
Save to your folder(s)

Do not allow public to see your dir structure just pleae this code in .htacces

Futther reading
There are two ways to approach this. The best way to do this is via your .htaccess or httpd.conf file (if you have your own Apache server). If your host allows the use of .htaccess, place this at the top:
The alternative would be to place a blank index.html file in each directory. This may seem trivial, but a crafty and knowledgeable attacker will only need a small amount of information to get into your server.


Copy this code and paste it in your HTML
  1. Options All -Indexes

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.