I'd like to dynamically add IPs to a block list via htaccess. I was hoping someone could tell me if the following will work in my case (I'm unsure how to test via localhost).
My .htaccess file will have the following by default:
order allow,deny allow from all
IPs will be dynamically appended:
Order Deny,Allow Allow from all Deny from 192.168.30.1
The way I understand this is that it is by default allow all with the optional list of deny rules. If I'm not mistaken
Order Deny,Allow will look at the Deny list first, is this correct?
And does the Allow from all rule need to be at the end?
If I'm not mistaken I need to do this based on jeffatrackaid's answer:
Order Allow,Deny Allow from all Deny from 192.168.30.1
For the sake of completeness, this is probably more appropriate for my requirements:
Order Deny,Allow Deny from 192.168.30.1