.htaccess allow from hostname?
- by Mikey B
Ubuntu 9.10
Apache2
Hi Guys,
Long story short, I need to restrict access to a certain part of my web site based on a dynamic IP source address that changes every now and then. Historically, I've just added the following to htaccess...
order deny,allow
deny from all
# allow my dynamic IP address
allow from <dynamic ip>
But the problem is that I'll have to manually make this change every time the IP changes.
Ideally I'd like to specify a hostname instead... something like:
order deny,allow
deny from all
# allow my host
allow from hostname.whatever.local
That doesn't seemed to have worked though. I get an error 403 - access forbidden. Does .htaccess not support hostnames?