IP Blocking not working

PHP only Application.

I can’t seem to get .htaccess to block all access (and then open up only certain IP addresses)

I know Apache 2.4+ does it differently to Apache 2.2, but I’m pretty sure were on Apache 2.4.10

my .htaccess looks like this - nothing seems to work

# Apache 2.2
Order deny,allow
Deny from all

# Apache 2.4+
Require all denied

<Limit GET POST>
order allow,deny
deny from all
## Just Allow a Single IP
##allow from

I found this thread on Stack Overflow. Hope you find some help from here.

Ibad Rehman

Probably a red herring, but I presume you have the tags around your .htaccess block? eg

<Limit GET POST>
  order allow,deny
  allow from all
  deny from

This is how I use it on one of my sites.