18

I need to password protect a website with a username/password but need to keep the "/assets" folder accessible as files like images/css are being embedded on other sites.

I have this for the protection:

Order Allow,Deny
AuthType Basic
AuthName "Password"
AuthUserFile /var/www/.htpasswd
Require valid-user
Satisfy Any

How can I specify to protect everything bar the /assets folder?

Shealan
  • 1,316
  • 3
  • 20
  • 32

1 Answers1

30

You'd use, in a .htaccess file in the assets/ directory:

Satisfy Any
Order Allow,Deny
Allow from all

See the examples here: http://httpd.apache.org/docs/2.2/mod/core.html#require

David Wolever
  • 148,955
  • 89
  • 346
  • 502