Welcome to WebmasterWorld Guest from 54.147.0.174

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

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

     

Asia_Expat

10:24 pm on Oct 2, 2011 (gmt 0)

5+ Year Member



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

11:07 pm on Oct 2, 2011 (gmt 0)

WebmasterWorld Senior Member leosghost is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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

11:26 pm on Oct 2, 2011 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



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

11:37 pm on Oct 2, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Was it this one? [webmasterworld.com...]

If so, it was #1 in Google for [deny competitor g1smd]. :)

Asia_Expat

2:47 am on Oct 5, 2011 (gmt 0)

5+ Year Member



Thanks, that gives me some stuff to work with.

Is blocking Greece (and possibly Spain) altogether, likely to cause me ranking/indexing issues?

g1smd

8:04 am on Oct 9, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Any searchengine that crawls with IPs from those countries will delist you.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month