这里是一个例子: http : //tools.pingdom.com/fpt/#!/cp0wwy/http : //www.shearcomfort.com/Car-Seat-Covers_CDN.asp
select任何图像,说2014_subaru_outback_mini.jpg然后你可以看到它出现两次:一次从cloudfront 0字节和第二次从实际域shearcomfort.com
任何人都可以解释这里发生了什么,以及如何使所有的资产只来自云端而不是来自主域?
您的CDNurl正在返回301redirect。
curl -I http://d3cerlni7xmxaw.cloudfront.net/images/stars/images/2starrating.gif
HTTP/1.1 301 Moved Permanently Content-Type: text/html Content-Length: 186 Connection: keep-alive Location: http://www.shearcomfort.com/images/stars/images/2starrating.gif Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Date: Tue, 20 May 2014 17:43:02 GMT X-Cache: Miss from cloudfront Via: 1.1 45f9deebd67d2bd40b8384feda6e6e32.cloudfront.net (CloudFront) X-Amz-Cf-Id: dcbTEOwj48JfPD8YrvKrk4m2-OCkCAAABdqnwGxBOfRkmdLLpl7ErQ==
我敢打赌,你把你的CloudFront分布在shearcomfort.com而不是www.shearcomfort.com 。 您显示该网站上的301个URL到www版本。
如果你正在运行一个仅限于https的站点,并且301将http访问者redirect到https(因此也是cloudfront),301永久移动也会发生。
在云端“原始协议策略”中有一个原始设置,确保将其设置为“Match Viewer”,以便cloudfront从原始服务器请求https版本,而不是http(默认情况下)。