apache_conf MaxMind GeoIP数据库.htaccess Cookie和HTTP变量

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf MaxMind GeoIP数据库.htaccess Cookie和HTTP变量相关的知识,希望对你有一定的参考价值。

.htaccess to set MM_Country_Code HTTP Header or Cookie
=====================================================

### Begin - MaxMind Country Detection
MaxMindDBEnable On
MaxMindDBFile DB /var/www/vhosts/example.com/private/GeoIP2-Country.mmdb
MaxMindDBEnv MM_COUNTRY_CODE DB/country/iso_code

Header add X-MM-Country-Code "%{MM_COUNTRY_CODE}e"
RequestHeader set X-MM-Country-Code "%{MM_COUNTRY_CODE}e"
Header set Set-Cookie "MM_COUNTRY_CODE=%{MM_COUNTRY_CODE}e;path=/"
### End - MaxMind Country Detection


# Creates:
# s.http_x_mm_country_code
# g.request_cookies:mm_country_code

以上是关于apache_conf MaxMind GeoIP数据库.htaccess Cookie和HTTP变量的主要内容,如果未能解决你的问题,请参考以下文章