Reputation: 558
I am using S3_website gem to push a react build to my bucket. Everything works great but when I navigate to a custom url and I hit refresh, I get a 404 error because it tries to find this object in the bucket instead of executing the route.
I have the default config in the s3_website yml with no redirect rules.
site: dist
index_document: index.html
error_document: error.html
s3_endpoint: us-east-2
cloudfront_wildcard_invalidation: true
What configuration I am missing?
Upvotes: 3
Views: 734
Reputation: 9418
In your bucket properties under Error Document
just use the same file as the Index Document
which should be your index.html
Upvotes: 8