【发布时间】:2015-01-26 09:49:50
【问题描述】:
我一直在尝试使用 Maxmind 的免费数据库对我的公司网站进行地理重定向。出于某种原因,该代码以前可以运行,但它无法正常运行 - 并且指向它的链接显示未经授权或不可用。
有人能解释一下吗?
可用的链接是...
<script src="//js.maxmind.com/js/country.js" type="text/javascript"></script>
但这似乎与无处链接。
使用的代码如下。
<script src="//js.maxmind.com/app/country.js" charset="ISO-8859-1" type="text/javascript"></script><script type="text/javascript">loc = (geoip_country_code());if (loc == 'US') {window.location = "http://usa.example.com/";}if (loc == 'GB') {window.location = "http://uk.example.com/";}
你知道这有什么问题吗?
【问题讨论】:
标签: javascript redirect geoip maxmind