Results 1 to 3 of 3
May 19, 2012, 21:31 #1
- Join Date
- Nov 2004
- 0 Post(s)
- 0 Thread(s)
Blocking all countries accept the USA
I have a php site and am getting some spam via my registration page although it has a CAPTCHA image.
Some suggested blocking certain countries who they believed were the most notorious spammers.
They directed me to this page:
where the author suggests code like this:
SetEnvIf CF-IPCountry CN BuzzOff=1 SetEnvIf CF-IPCountry RU BuzzOff=1 SetEnvIf CF-IPCountry IN BuzzOff=1 Order allow,deny Allow from all Deny from env=BuzzOff
"wondering how I might be able to do basically the opposite, which would be to set htaccess to only allow visitors from specific countries...would like to restrict it to only US visitors without listing every other country on the planet. My gut says this should work:
SetEnvIf CF-IPCountry US IsUSA=1 Order deny,allow Deny from all Allow from env=IsUSA"
Do you think this code can block all but the USA. I'd be interested in targeting only usa visitors to my site.
Can you provide some insight or your opinion on this subject?
Do you have a better solution?