I have set up two S3 Buckets for domain.com
and www.domain.com
and distributions for both on Cloudfront. Bucket with www
just redirects requests to non-www
bucket static Endpoint. So basically it repeats steps from this answer. The only difference is, I used REST origins instead of static URL provided by S3 Buckets.
The problem is when I'm accessing www.domain.com
it redirects to domain.com
but it appends index.html
at the end of the URL, and this messing with ReactJS
somehow - the page simply does not render. Direct call to domain.com
works fine, no index.html
at the end.
What could be wrong with the setup?