Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude folder from htpasswd

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?

like image 294
Shealan Avatar asked Mar 25 '12 00:03

Shealan


1 Answers

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

like image 189
David Wolever Avatar answered Sep 23 '22 03:09

David Wolever