如何重定向到CloudFront分配中的特定CNAME

问题描述:

我在AWS中有2个CloudFront发行版,每个发行版都有自己不同的证书.每个CNAME都附加有几个CNAME,并且每个CNAME在Route 53中都有一个对应的记录集.

I have 2 CloudFront distributions in AWS, each with its own different certificate. Each has several CNAMEs attached and each CNAME has a corresponding Record Set in Route 53.

是否可以将其中一个URL重定向到另一个CloudFront发行版中的CNAME?

Is there a way to redirect one of the URLs to a CNAME in the other CloudFront Distribution?

例如,如果CloudFront发行版A包含2个CNAME,即abc.my-old-site.com和123.my-old-site.com,而CloudFront发行版B中包含2个CNAME,即abc.my-new-site.com和123.my-new-site.com,我可以将abc.my-old-site.com重定向到abc.my-new-site.com吗?

So for example, if CloudFront Distribution A contains 2 CNAMES, abc.my-old-site.com and 123.my-old-site.com, and CloudFront Distribution B contains 2 CNAMEs, abc.my-new-site.com and 123.my-new-site.com, can I redirect abc.my-old-site.com to abc.my-new-site.com?

您可以通过以下两种方式进行操作:

You can do two ways this :

第一

  1. 创建S3存储桶
  2. 使用此
  3. 设置 route53中的S3端点
  4. 如果要使用cloudfront,则还可以将route53设置为cloudfront端点.

第二

  1. 针对路由在route53中转发abc.my-old-site.com到abc.my-new-site.com
  1. Domain forwarding in route53 against abc.my-old-site.com to abc.my-new-site.com