I have hosted a static react website on aws and use s3, cloudfront. It has several subpages.
<Link to='/about'>about us</Link>
<Link to='/projects'>projects</Link>
<Link to='/stats'>statistics</Link>
<Link to='/contact'>contact</Link>
When you entered to home page from browser and select one of these subpage's button it will successfully redirect to sub page.
but when you entered the url directly (www.example.com/about) in browser it wont redirect to the subpage and gives this error i.e. "This XML file does not appear to have any style information associated with it. The document tree is shown below."
I did check on developer tools and saw that when you click on the "about" button request header is like this
:path: /static/js/6.gc48fd92.chunk.js
referer: https://www.example.com/about
but when you entered the url in browser directly i.e. (www.example.com/about) , the request header is like this
:path: /about
and "referer" is not there.
Am i missing something here ? Is there a way to redirect to static js page when you entered the subpage's url in browser ?
Thanks in advance.