.htacces for conditional htauth

Author: stephan  |  Category: Sonstiges


Dies ist ein Beispiel für eine .htaccess ,die ein Passwort verlangt, ausser man kommt von bestimmten IPs.

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



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