我创建了一个用于为静态网站提供服务的cloudfront发行版。 S3是原始服务器。 现在,如果我们访问云端URL,它将重定向到S3位置。AWS Cloudfront重定向到S3存储桶
d2s18t7gwlicql.cloudfront.net 或 test.telekha.in
在浏览器中它显示 https://telekha-test-www.s3.ap-south-1.amazonaws.com/index.html#/dashboard
我期待https://test.telekha.in/#/dashboard
如果我通过卷曲访问https://test.telekha.in返回我的index.html文件
如果我通过curl访问http://test.telekha.in它返回
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>CloudFront</center>
</body>
</html>
但在浏览器HTTP和HTTPS重定向到https://telekha-test-www.s3.ap-south-1.amazonaws.com/index.html#/
请让我知道如何解决这个问题。
使用S3 URL配置原点可以使用可能不合需要的S3和CF网址提供内容。 – Kiril