Welcome! Log In Create A New Profile

Advanced

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

CLIFFORD ILKAY
February 14, 2010 04:02PM
On 02/14/2010 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?

Hello,

This is straight from the site configuration of one of our clients. They
decided which countries to block based upon past fraud statistics.

map $geoip_country_code $sb_allow {
default yes;
bg no;
cn no;
ee no;
kr no;
lv no;
my no;
ng no;
ro no;
ru no;
th no;
ua no;
vn no;
}

server {
listen 80;
....
if ($sb_allow = no) {
return 403;
}
....
}
--
Regards,

Clifford Ilkay
Dinamis
1419-3266 Yonge St.
Toronto, ON
Canada M4N 3P6

http://dinamis.com
+1 416-410-3326

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

David Taveras February 14, 2010 12:08AM

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

David Taveras February 14, 2010 12:18AM

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

Jim Ohlstein February 14, 2010 12:24AM

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

CLIFFORD ILKAY February 14, 2010 04:02PM

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

Cliff Wells February 14, 2010 07:42PM

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

CLIFFORD ILKAY February 14, 2010 08:50PM

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

Todd Fisher February 14, 2010 10:22PM

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

CLIFFORD ILKAY February 14, 2010 11:00PM

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

Cliff Wells February 15, 2010 12:48AM

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

Cliff Wells February 15, 2010 12:44AM

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

CLIFFORD ILKAY February 15, 2010 01:30AM

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

Jim Ohlstein February 15, 2010 09:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 139
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready