我的网站是在example.com上。我已经创建了一个S3存储桶,并设置了重定向所有请求到example.com,并创建了一个DNS条目将www.example.com指向该S3存储桶。到目前为止,从http://www.example.com重定向到http://example.com正常工作。
我无法将https流量从https://www.example.com重定向到https://example.com。
我创建了一个Cloudfront分配并为其添加了SSL,并将其指向上述S3存储桶。当我尝试访问给定域名的分配时,浏览器中没有被重定向,而是显示以下内容:
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Name>www.example.com</Name>
<Prefix/>
<Marker/>
<MaxKeys>1000</MaxKeys>
<IsTruncated>false</IsTruncated>
</ListBucketResult>
我的分发一般设置为:
Distribution ID XXXXXXXXXXXX
Log Prefix -
Delivery Method Web
Cookie Logging Off
Distribution Status Deployed
Comment -
Price Class Use All Edge Locations (Best Performance)
AWS WAF Web ACL -
State Enabled
Alternate Domain Names (CNAMEs) -
SSL Certificate mycert
Domain Name xxxxxxxxxxx.cloudfront.net
Custom SSL Client Support Only Clients that Support Server Name Indication (SNI)
Default Root Object -
Last Modified 2016-01-18 16:12 UTC+2
Log Bucket
有什么办法让它工作吗?