Block and Redirect an IP Address

  • 21 July 2016
  • 3 replies
  • 42 views

Hey, 

I was having some issues with abuse from certain IP addresses so I wanted to post my solution here. This script will redirect anyone who is a known abuser or competitors to keep your secrets hidden :) 

You’ll want to replace 24.24.24.24 with the IPs you’d like to block and google.com with the address you’d like to redirect to. I suggest a Rick Roll :) 


3 replies

Userlevel 5
Badge +4

Thanks Devin, that’s a great tips !

Do you know if it’s possible to restrict my page to a certain country ? Like France for example ?

If I didn’t know any better, I’d say you probably have 18 inch biceps. But that’s just what I see from the code.

Hi @Devin_Shurtleff

I’d be really grateful to get a copy of the code mentioned in this post?

Thanks.

Reply