Block and Redirect an IP Address



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 with the IPs you’d like to block and with the address you’d like to redirect to. I suggest a Rick Roll :) 


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?