我基本上有 2 个托管区域 **.com 和 **.co.in。对于所有来自印度的传入流量,如果用户浏览 .com,它应该自动重定向到 co.in。我们如何在 AWS 中做到这一点。我读了这个http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-geo.html#rrsets-values-geo-location并在 co.in 托管区域中实现,但似乎不起作用。此外,我认为应该在 .com 中设置一些域重定向,但找不到我们可以在 Route53 中做什么
问候 拉哈夫
最佳答案
为了简化我的解决方案,我将这些域称为 example.com
和 example.co.in
。以下是我将如何解决这个问题:
example.com
的 S3 存储桶:
Static Website Hosting:
Redirect Requests:
Target Bucket or Domain: example.co.in
请注意创建此存储桶的区域,例如 us-east-1
,我们稍后会用到它
example.com
的 Route 53 记录集对于印度:
Type: CNAME
Value: example.co.in.s3-static-website-[region].amazonaws.com
Routing Policy: Geolocation
Location: India
Set ID: India Redirect
example.com
而非印度 的 Route 53 记录集:
您将Type
和Value
设置为正常
Routing Policy: Geolocation
Location: Default
Set ID: Regular Traffic
进一步阅读:
关于amazon-web-services - 基于 Geo 的域重定向 - AWS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46212241/