我目前在我的HTaccess中设置了一个地理重定向,用于将来自asia.com的亚洲访问者重定向到asia.example.com。我现在想知道如何覆盖重定向,以便asia.example.com的用户可以通过asia.example.com上的链接访问example.com。如何覆盖地理IP重定向
这是可能的还是我必须使用客户端重定向,我将如何去设置它。
一些背景信息example.com正在运行magento,asia.example.com将成为目前的着陆页。
感谢
更新:我的主人说我应该安装此https://github.com/maxmind/GeoIP2-php上Magento的......我该怎么做?从评论
更新:
# Redirect multiple countries to a single page
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(VN|SG|CN|MY|JP|KP|KR)$
RewriteRule ^(.*)$ asia.example.com$1 [R,L]
请从'.htaccess'显示您重定向代码 – clockworkgeek 2014-09-22 20:31:17
#将多个国家重定向到单个页面 RewriteEngine on RewriteCond%{ENV:GEOIP_COUNTRY_CODE} ^(VN | SG | CN | MY | JP | KP | KR)$ RewriteRule ^(。*)$ http:// asia .example.com $ 1 [R,L] – Sean 2014-09-22 22:16:20