{"action":"opened","issue":{"url":"https://api.github.com/repos/maxmind/mod_maxminddb/issues/27","labels_url":"https://api.github.com/repos/maxmind/mod_maxminddb/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/maxmind/mod_maxminddb/issues/27/comments","events_url":"https://api.github.com/repos/maxmind/mod_maxminddb/issues/27/events","html_url":"https://github.com/maxmind/mod_maxminddb/issues/27","id":67742557,"number":27,"title":"Environment variables not accessible by mod_rewrite","user":{"login":"dms173","id":11896757,"avatar_url":"https://avatars.githubusercontent.com/u/11896757?v=3","gravatar_id":"","url":"https://api.github.com/users/dms173","html_url":"https://github.com/dms173","followers_url":"https://api.github.com/users/dms173/followers","following_url":"https://api.github.com/users/dms173/following{/other_user}","gists_url":"https://api.github.com/users/dms173/gists{/gist_id}","starred_url":"https://api.github.com/users/dms173/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dms173/subscriptions","organizations_url":"https://api.github.com/users/dms173/orgs","repos_url":"https://api.github.com/users/dms173/repos","events_url":"https://api.github.com/users/dms173/events{/privacy}","received_events_url":"https://api.github.com/users/dms173/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-11T06:25:49Z","updated_at":"2015-04-11T06:25:49Z","closed_at":null,"body":"It seems like in Apache 2.4, the environment variable being set by MaxMindDBEnv is not accessible by mod_rewrite.  Any ideas on how to access it? I've tried the following with no luck:\r\n\r\n/etc/apache2//mods-enabled/maxminddb.conf:\r\n<IfModule mod_maxminddb.c>\r\n        MaxMindDBEnable On\r\n        MaxMindDBFile COUNTRY_DB /etc/apache2/geoip/GeoLite2-Country.mmdb\r\n        MaxMindDBEnv MM_COUNTRY_CODE COUNTRY_DB/country/iso_code\r\n        SetEnvIf MM_COUNTRY_CODE US VISITOR_COUNTRY=US\r\n</IfModule>\r\n\r\n\r\n/etc/apache2/sites-enabled/000-default.conf:\r\nRewriteEngine On\r\nRewriteCond %{ENV:MM_COUNTRY_CODE} US [OR]\r\nRewriteCond %{ENV:VISITOR_COUNTRY} US\r\nRewriteRule ^(.*)$ http://www.example.com/us/$1 [L]\r\n\r\n\r\nBoth ENV:MM_COUNTRY_CODE and ENV:VISITOR_COUNTRY are empty.  Any ideas?\r\n"}}