View Single Post
Old 07-01-2005, 06:12 AM  
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
Aye, get a database from Maxmind. The free one is decent, but the paid versions are obviously better.
I wouldn't just block them. Redirect them somewhere, (dialer, or AFF or something.) where you might at least have a chance at getting something out of them.

Simply add:

GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat

RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^XX$
RewriteRule ^(.*)$ http://www.shitcountry.url [L]

XX would be replaced by the code for the country in question. If redirecting numerous countries to the same URL don't forget to add [OR] after each RewriteCond statement EXCEPT for the last one. If redirecting numerous countries, each to different locations, you'll need one RewriteCond statement AND RewriteRule for each.
__________________
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote