.htaccess allow from hostname?
        Posted  
        
            by Mikey B
        on Server Fault
        
        See other posts from Server Fault
        
            or by Mikey B
        
        
        
        Published on 2009-12-01T23:41:48Z
        Indexed on 
            2010/03/15
            23:40 UTC
        
        
        Read the original article
        Hit count: 849
        
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?
© Server Fault or respective owner