Msg#: 4369890 posted 10:24 pm on Oct 2, 2011 (gmt 0)
Long story short. I have an unwelcome guest on my site (family member, complete nutter, stalker, psycho etc etc), and the only way to be sure that person can't access my site is to block their country. I only get four or five visitors per day from that country, so it's no great loss. She's also too stupid to know about VPN, or how to use it.
I want to use CIDR notation downloaded from countryipblocks, or similar. I've found lots of tutorials on blocking, but can't figure out how to display a special page for that country (I'll add a 403 header in PHP at the top of the page). I want to create a bespoke page for that particular country.
Whatever I use, I'll drop it into my httpd.conf file for resource efficiency.
Msg#: 4369890 posted 11:07 pm on Oct 2, 2011 (gmt 0)
We had a similar problem a few months back here... for someone who wanted to show a different page to their competitor... if g1smd can find the thread via WebmasterWorld search* ( he'll be a better man than I Gungadin .."clue" he is ;-) ..between us ..we gave the script and the IP tables base( IIRC re the IP tables base )- ( the only really accurate IP country tables are paid, unfortunately for you..look for "maxmind" ) ..that thread will give you what you need via php "switch" and redirect...you may also want to include something against proxies via xheaders if the person is being really difficult and knows how to use proxies...
*I can never get search here to work .. it is offline whenever I try...anyway HTH :)