010*_*101 5 amazon-s3 amazon-web-services
我正在尝试在我的 s3 托管网站中构建一些登陆页面。
例如:http://www.example.com/products
那应该重定向到http://www.example.com/products.html
为了实现这一目标,我了解了重定向规则并创建了这个工作规则:
网站.json
{
"Bucket": "www.example.com",
"WebsiteConfiguration": {
"ErrorDocument": {
"Key": "404.html"
},
"IndexDocument": {
"Suffix": "index.html"
},
"RoutingRules": [
{
"Condition": {
"KeyPrefixEquals": "products/"
},
"Redirect": {
"ReplaceKeyWith": "products.html"
}
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
我使用命令行上传了这个 json 文件:aws s3api put-bucket-website --cli-input-json file://website.json
问题:
尾部斜杠。 为此,用户必须导航到http://www.example.com/products/ 我希望用户能够导航到http://www.example.com/products <-- 没有尾部斜杠。
我试图将其从规则中删除。它搞砸了。这似乎是不可能的。是吗?
相关文章:
归档时间: |
|
查看次数: |
4968 次 |
最近记录: |