相关疑难解决方法(0)

没有.html扩展名的S3静态页面

在从Amazon S3提供静态站点时,我想知道如何摆脱.html每个页面的文件扩展名.

现在我有:

mysite.com/             # works fine, serves index.html
mysite.com/mypage.html  # works fine
mysite.com/mypage       # doesn't work
Run Code Online (Sandbox Code Playgroud)

/mypage节目的错误:

404 Not Found

Code: NoSuchKey
Message: The specified key does not exist.
Key: mypage
RequestId: 1089D7A26EFED9AD
HostId: Ud8cFy8Zl1mJ+oFjFOmU1Xacq9+v70KuaJfOc4nFMEPhd66AkLhr4Pj5u0QH6Gog
Run Code Online (Sandbox Code Playgroud)

我已尝试设置Content-Typetext/html,根据这篇文章,但它并没有解决我的问题.

如何在S3上/mypage提供文件服务/mypage.html

html amazon-s3 amazon-web-services

56
推荐指数
7
解决办法
2万
查看次数

标签 统计

amazon-s3 ×1

amazon-web-services ×1

html ×1