1

Seen lots of info regarding this but can't figure out this scenario. I want to deny all uk ips but allow my own uk ip.

I have a big list of deny ip addresses which work fine and deny access, but I want to be able to access the site for obvious reasons!

Basically I'm creating a site for Irish consumer base and the owner wants to exclude the UK from accessing the site. But I need to access it still.

Tom Rudge
  • 3,200
  • 6
  • 45
  • 79

1 Answers1

0

In your .htaccess file put this rule in same manner and write your ip's which are whitelisted in allow from your ip

<Directory "/">
   order deny,allow
   deny from all
   allow from 127.0.0.1
   allow from 127.0.0.2
</Directory>

Using Require

<RequireAll>
    Require all granted
    Require not ip 10.252.46.165
</RequireAll>

https://httpd.apache.org/docs/2.4/howto/access.html

Abhishek Gurjar
  • 7,330
  • 10
  • 37
  • 44