amazon-web-services - 基于 Geo 的域重定向 - AWS

标签 amazon-web-services redirect amazon-ec2 amazon-route53

我基本上有 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.comexample.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 记录集:

您将TypeValue 设置为正常

Routing Policy: Geolocation
  Location: Default
  Set ID: Regular Traffic

进一步阅读:

关于amazon-web-services - 基于 Geo 的域重定向 - AWS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46212241/

相关文章:

reactjs - aws s3 存储桶中的文件在通过 aws cli 同步后不公开

node.js - 使用 AWS Lambda NodeJS 时无法返回结果

amazon-web-services - 如何在 AWS lex 上使用自由文本自定义槽类型

redirect - 事件 URL 中的加密数据对 SEO 的影响

python - 如何访问在 Amazon ec2 上运行的 Django 应用程序?

Python Flask-Mysql KeyError : 'MYSQL_HOST'

ssl - 使用 Let's Encrypt 将 SSL 证书添加到 AWS EC2 实例时出现 "Unauthorized"错误

java - AWS Elastic Map Reduce 中线程 "main"java.lang.NoClassDefFoundError 中的异常

PHP,如何创建倒数计时器?

reactjs - 使用 Typescript 在 React 中重定向