How to protect your web directories

Published at December 27, 2007   Filed Under Technology, Tools    

feedIf you're new here, you may want to subscribe to my RSS feed or Email alerts. Thanks for visiting!

I just saw a post on Life Rocks 2.0 which explains you to how to protect your wordpress theme files. It is possible for any one to see your wordpress theme files or plugin folders to see what themes you are using or what plugins you use if you don’t protect them.

What you do to protect, one method is to follow above linked post, but the problem is what to do when you have many directories with out index.html files. In this case adding a simple rule to your .htaccess will solve the problem.

Simply add “Options -Indexes” to your .htaccess file, so whenever try to open any directory on your webserver with out index.html file will show a 403 error page. With this one rule you can save lot of time in creating index.html files to each directory.

htaccess options indexes

This only works with Apache Webserver. Read more about Options indexes.

If you liked this post, feel free to subscribe to my RSS feed

7 Responses to “How to protect your web directories”


  1. Nirmal
    December 27th, 2007 9:53 pm
    Thanks for the mention and the htaccess rule is the best one I guess, but people with less experience in htaccess may find it difficult.
  2. kanak
    December 28th, 2007 12:56 am
    thanks Ram for this. I added that .html file before. I thot of searching the htaccess rule but before that you posted this. Thanks for sharing this simple trick. I added this too in my htaccess file.
  3. Haris
    December 28th, 2007 12:24 pm
    I played with the htaccess only once. will see if I can do it myself or will ask for help from you! :D
  4. Ram
    December 28th, 2007 4:30 pm
    @Nirmal,
    ur right for inexperienced users it may be difficult to play with htaccess.
    @Kanak
    You are welcome
    @Haris
    You are welcome, don’t hesitate to contact me if you need any help.
  5. Syahid A.
    December 31st, 2007 6:40 am
    Easy, useful and quick tip. Just what I need.
  6. Ram
    December 31st, 2007 9:06 am
    @Syahid
    Glad that it is useful for you

Trackbacks/Pingbacks

  1. curious » Blog Archive » protect your wordpress folder
  2. December 29th, 2007 12:32 am

Leave a Reply