How-To: htaccess – Require a password for some IPs, not others
Apr.04, 2008 in
How To
The following is a really useful .htaccess configuration options to allow certain IP address to access a site without a password, while requiring everyone else to enter a password:
AuthName "My Secret Page Here"
AuthUserFile /sites/apache-passwords
AuthType Basic
Require valid-user
Order deny,allow
Deny from all
Allow from 171.231.12.8
Satisfy Any
Some really handy examples are available here too.

Leave a Reply