Richard Parnaby-King Richard Parnaby-King - 3 months ago 14
Apache Configuration Question

htaccess password protect but not on localhost

I have set up a dev site and want to password protect it so only validated visitors can view the site. All well and good. I am getting annoyed, on my local version, entering my username and password. So, without changing the htaccess file between my local copy and the one on the dev site, how do I password protect the site but allow myself access without having to enter my username and password?

Ben Ben
Answer

Something like this should do the trick..

Require valid-user
Allow from 127.0.0.1
Satisfy Any

From: http://httpd.apache.org/docs/2.0/mod/core.html#satisfy

Comments