I need to apply HTTP auth just in public use of website, but I don t apply it on my localhost. This is the .htaccess
that I think should work. But it doesn t work - it still asks me for user/pass.
What am I doing wrong?
SetEnvIf Remote_Addr ^127.0.0.1$ develmode
<IfDefine !develmode>
AuthType Basic
AuthName "ADMIN"
AuthUserFile /path/to/.htpasswd
Require valid-user
</IfDefine>
mod_setenvif
当然是能够做到的。