【问题标题】:GeoRedirect using the free API使用免费 API 的 GeoRedirect
【发布时间】: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


    【解决方案1】:

    Maxmind Javascript 不再免费。

    【讨论】:

      猜你喜欢
      • 2023-04-02
      • 1970-01-01
      • 2021-07-22
      • 2020-09-30
      • 1970-01-01
      • 2021-05-19
      • 2013-07-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多