I'm attempting to password protect my public folder so that anyone trying to access externally is prompted to enter a password but not locally. So far I have got it to work using 127.0.0.1 but not localhost. Obviously I COULD just used the ip address but it's more the fact I want to know why it doesn't work. I don't like to be defeated!
#Enable Password Protection
AuthName "Password Protected Server"
AuthType Basic
AuthUserFile c:\xampp\apache\security\.htpasswd
Require valid-user
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
Satisfy Any
My code so far is an accumulation of:
http://www.groovypost.com/howto/how-to/htaccess-password-protect-apache-website-security/
htaccess password protect but not on localhost
I'm running XAMPP 1.7.3 on Windows 7, in case that helps.
Any assistance would be greatly appreciated!