I have a .htaccess that uses basic authentication. It seems the path to the .htpasswd file isn\'t relative to the htaccess file, but instead to the server config.
So eve
I know this is an old question, but I just searched for the same thing and probably there are many others searching for a quick, mobile solution. Here is what I finally come up with:
# We set production environment by default
SetEnv PROD_ENV 1
# If 'DEV_ENV' has been defined, then unset the PROD_ENV
UnsetEnv PROD_ENV
AuthType Basic
AuthName "Protected Area"
AuthUserFile /var/www/foo.local/.htpasswd
Require valid-user
AuthType Basic
AuthName "Protected Area"
AuthUserFile /home/foo/public_html/.htpasswd
Require valid-user