# Allow access from a list of IP addresses
<IfModule mod_setenvif.c>
# <SERVER-NAME>
SetEnvIf Remote_Addr "^<IP-REGEXP>$" allowed_ip
# user agent string
SetEnvIf User-Agent "^<UA>$" allowed_ua
SetEnvIf Request_Method "^GET$" allowed_method
SetEnvIf X-Secret-Key "^$" missing_secret
Order Allow,Deny
Allow from all
Deny from env=!allowed_ip
Deny from env=!allowed_ua
Deny from env=!allowed_method
Deny from env=missing_secret
</IfModule>
<IfModule !mod_setenvif.c>
Order Deny,Allow
Deny from all
# <SERVER-NAME>
Allow from <IP>
</IfModule>