| Deny Greece, and show them a tailor made 'go away' page
|
Asia_Expat

msg:4369892 | 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. Any tips or pointers?
|
Leosghost

msg:4369908 | 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 :)
|
lucy24

msg:4369912 | 11:26 pm on Oct 2, 2011 (gmt 0) | Can't you just do it with mod_rewrite? Set your assorted IP ranges as conditions (pipe-separated if you can, OR if you must), redirect to the named page and there you are. :: twiddling thumbs idly ::
|
g1smd

msg:4369914 | 11:37 pm on Oct 2, 2011 (gmt 0) | Was it this one? [webmasterworld.com...] If so, it was #1 in Google for [deny competitor g1smd]. :)
|
Asia_Expat

msg:4370879 | 2:47 am on Oct 5, 2011 (gmt 0) | Thanks, that gives me some stuff to work with. Is blocking Greece (and possibly Spain) altogether, likely to cause me ranking/indexing issues?
|
g1smd

msg:4372364 | 8:04 am on Oct 9, 2011 (gmt 0) | Any searchengine that crawls with IPs from those countries will delist you.
|
|
|