s3 redirect all requests to index html

Solutions on MaxInterview for s3 redirect all requests to index html by the best coders in the world

showing results for - "s3 redirect all requests to index html"
Claudio
22 Jul 2018
1It's very easy to solve it without url hacks, with CloudFront help.
2
3Create S3 bucket, for example: react
4Create CloudFront distributions with these settings:
5Default Root Object: index.html
6Origin Domain Name: S3 bucket domain, for example: react.s3.amazonaws.com
7Go to Error Pages tab, click on Create Custom Error Response:
8HTTP Error Code: 403: Forbidden (404: Not Found, in case of S3 Static Website)
9Customize Error Response: Yes
10Response Page Path: /index.html
11HTTP Response Code: 200: OK
12Click on Create