Htaccess: Allow from domain name instead of IP/subnet

.htaccess

On my Authentication page i have it only allow from certain IPs. Is it possible to have it allow by a domain name? The IP of my home network is dynamic but the domain name (mysite.com) always points to the correct IP address.

Best Answer

Yes you can. Your .htacces would look like

order deny,allow
deny from all
allow from mysite.com
Related Topic