Block and Redirect an IP Address


#1

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 :) 


#2

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 ?


#3

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.


#4

Hi @Devin_Shurtleff

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

Thanks.