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.

Leave a Reply