Nginx可配合GeoIP模块定位IP所在物理位置并做相应处理,支持多个条件匹配:
http://www.haiyun.me/archives/nginx-geoip.html
http://nginx.org/cn/docs/http/ngx_http_geo_module.html
http://deidara.blog.51cto.com/400447/198469/
#http://www.haiyun.me $geoip_country_code #国家代码2位,如CN $geoip_country_code3 #国家代码3位,如CHN $geoip_country_name #国家完整名称,如China $geoip_region #所在地区 $geoip_city #所在城市,如BeiJing $geoip_postal_code #邮政编码 $geoip_city_continent_code #所在洲,如AS $geoip_latitude #纬度 $geoip_longitude #经度