htaccess order Deny,Allow rule
- by aspiringCodeArtisan
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?