【发布时间】:2014-05-05 01:50:05
【问题描述】:
在为 Amazon S3 的静态站点提供服务时,我想知道如何摆脱每个页面的 .html 文件扩展名。
现在我有:
mysite.com/ # works fine, serves index.html
mysite.com/mypage.html # works fine
mysite.com/mypage # doesn't work
/mypage 的错误显示:
404 Not Found
Code: NoSuchKey
Message: The specified key does not exist.
Key: mypage
RequestId: 1089D7A26EFED9AD
HostId: Ud8cFy8Zl1mJ+oFjFOmU1Xacq9+v70KuaJfOc4nFMEPhd66AkLhr4Pj5u0QH6Gog
我尝试按照this post 将Content-Type 设置为text/html,但这并不能解决我的问题。
如何让 /mypage 在 S3 上的 /mypage.html 上提供文件?
【问题讨论】:
标签: html amazon-web-services amazon-s3