How do you set a default root object for subdirectories for a statically hosted website on Cloudfront?

前端 未结 9 1983
[愿得一人]
[愿得一人] 2020-12-22 17:33

How do you set a default root object for subdirectories on a statically hosted website on Cloudfront? Specifically, I\'d like www.example.com/subdir/index.html

9条回答
  •  我在风中等你
    2020-12-22 18:23

    There is one other way to get a default file served in a subdirectory, like example.com/subdir/. You can actually (programatically) store a file with the key subdir/ in the bucket. This file will not show up in the S3 management console, but it actually exists, and CloudFront will serve it.

提交回复
热议问题