Returning index.html for all the 404 requests on S3 instead of redirecting

前端 未结 1 1813
逝去的感伤
逝去的感伤 2021-01-21 05:49

In single page applications, usually, there\'s routing mechanism used where all the content is kept in index.html and Javascript manages URL addressing by showing t

1条回答
  •  失恋的感觉
    2021-01-21 06:33

    You can redirect all 4XX errors to index.html by putting it in the error document config under Static website hosting.

    ref: https://serverless-stack.com/chapters/create-an-s3-bucket.html#enable-static-web-hosting

    0 讨论(0)
提交回复
热议问题