I have this in my .htaccess to require a password but allow certain whitelisted IP addresses without authentication.
Order deny,allow
Deny from all
AuthType basic
AuthName "Admins Only"
AuthUserFile /etc/apache/.htpasswd
Require valid-user
#replace xxx with IP allowed
Allow from xxx.xxx.xxx.xxx
Satisfy any
Using Apache 2.2.16 on RedHat.
Two things are happening here:
- It still asks the whitelisted addresses for password, and
- when I visit the site on my Android device, I can see the website behind the auth popup, then when I cancel it, I can still browse the site.
Has anyone else experienced similar symptoms and have suggestions?
Note: When I remove the Deny, Allow, and Satisfy rules, the auth works as expected.