i can't reach my about page from url. #9023
-
hey i am a starter. I create this site with react and routing with react-router. ''https://hex909countries.netlify.app/" I can access all pages in this website. but I can't access any page (path) from direct url or ''/country/Yemen" in this path if i refresh in this page it will shows 404 Page Not Found. how can i fix this. give me any resources that will helps me. and also not showing 404 page? https://hex909countries.netlify.app/ here is my code https://github.com/hex909/countries |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
Hello. When creating a single page app, you need to tell your web server that all requests should actually be redirected to the single page. I'm not very familiar with Netlify, but please see the "Avoid 404s" section here: https://docs.netlify.com/configure-builds/javascript-spas/#app |
Beta Was this translation helpful? Give feedback.
-
For Netlify, you need to add a In that file you need to enter the following paths to allow every redirect. It basically tells the Netlify host to send the HTTP-code 200 (OK) to the client on every redirect. I hope this helps. Please let me know if it doesn't! 😃 |
Beta Was this translation helpful? Give feedback.
Hello. When creating a single page app, you need to tell your web server that all requests should actually be redirected to the single page. I'm not very familiar with Netlify, but please see the "Avoid 404s" section here: https://docs.netlify.com/configure-builds/javascript-spas/#app