GeoIP rewite rule?, redirect CHINA users to an error page.

Jim Ohlstein jim at ohlste.in
Sun Feb 14 08:20:37 MSK 2010


On 2/14/10 12:05 AM, David Taveras wrote:
> Hello,
>
> Iam wondering if somebody could help me out in applying the GeoIP
> module country variable for china so that if it matches redirect the
> user to an error page?

Something like:

if ($geoip_country_code = CN) {
     return 403;  # or whatever you choose
}

Note the Geo module might well work better for you. See 
http://forum.nginx.org/read.php?2,5306,5306#msg-5306.

>
> Thanks..!
>
> David
>

-- 
Jim Ohlstein



More information about the nginx mailing list