Remove and Ignore Password Protection on Subdirectories with htaccess

If you are using Basic Auth in your .htaccess file to protect a directory on your server, by default, it also protects all subdirectories as well. But what if you have one particular subfolder that you want to unprotected, and you want the password ignored or removed?

There is a very easy solution!

Create a new .htaccess file with:
Satisfy Any
on its own line, and place this in the subdirectory that you do NOT want to be password protected.

Note that all the subdirectories under this unprotected subdirectory will also become unprotected, so you may need to add new Basic Auth .htaccess files to these subdirectories if you want them protected as well.

SHARE THIS POST ON YOUR FAVORITE SOCIAL NETWORK:
  • email
  • Print
  • RSS
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • LinkedIn
  • Google Buzz
  • Google Bookmarks
  • Yahoo! Buzz
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • Slashdot
  • Blogosphere
  • MSN Reporter
  • MyShare
  • Propeller
  • Tumblr

Leave a Reply