Answers for "s3 redirect all requests to index.html"

0

s3 redirect all requests to index.html

It's very easy to solve it without url hacks, with CloudFront help.

Create S3 bucket, for example: react
Create CloudFront distributions with these settings:
Default Root Object: index.html
Origin Domain Name: S3 bucket domain, for example: react.s3.amazonaws.com
Go to Error Pages tab, click on Create Custom Error Response:
HTTP Error Code: 403: Forbidden (404: Not Found, in case of S3 Static Website)
Customize Error Response: Yes
Response Page Path: /index.html
HTTP Response Code: 200: OK
Click on Create
Posted by: Guest on February-11-2021

Code answers related to "s3 redirect all requests to index.html"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language