Well if I just take the code from the above page, I get something like this code:
Does it look like it would work?
Code:
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(US|CA|CN|RU|BR|JP|PK|SA|ID|BY|IR|IQ)$
RewriteRule ^/*$ http://www.domain.com/$1 [R=301,L]
RewriteCond %{REMOTE_ADDR} !^66\.249\.(6[4-9]|[78][0-9]|9[0-5])\.
RewriteCond %{HTTP_USER_AGENT} !(Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Msnbot|Bingbot|Slurp|Teoma) [NC]