.htacces for conditional htauth

Author: Stephan  |  Category: Sonstiges

This is an example for an .htaccess ,which request a Password besides the request is comming from IP 127.0.0.1 or 217.10.14.27

Order deny,allow
Deny from all
AuthName "htaccess password prompt"
AuthUserFile /var/www/.htpasswd
AuthType Basic
Require valid-user
Allow from 217.10.14.27
Allow from 127.0.0.1
Satisfy Any