我试图重定向我的 S3 托管网站的根 URL(内置于 Jekyll,使用 s3_website gem 部署),但没有任何成功。
我在以下示例中的目标是使用 s3_website 的路由功能将http://www.example.com/重定向到http://www.example.com/redirect_to_here/ 。
以下是我尝试过的两种路由规则变体,但没有任何运气:
routing_rules:
- condition:
key_prefix_equals: "" # Empty prefix
redirect:
host_name: www.example.com
replace_key_prefix_with: redirect_to_here/
http_redirect_code: 302
和
routing_rules:
- condition:
key_prefix_equals: /
redirect:
host_name: www.example.com
replace_key_prefix_with: redirect_to_here/
http_redirect_code: 302
考虑到 S3 的重定向实现,这可能吗?如果是这样,我错过了什么?