kerl213
September 14, 2023, 3:18pm
1
Site name: https://mealdbproject13.netlify.app/
Framework JS: React
Hi everyone, I have a weird issue with my site on Netlify.
When I try to access to any of my navbar items, it’s works perfect the first time my site loads, althought if I want to access to Recipes typing it from the browser, it returns error 404.
Which would be the main reason about this?
luke
September 14, 2023, 7:02pm
2
Hi, @kerl213 . The solution for this exact issue can be found here:
Last reviewed by Netlify Support - August, 2023
If you’re building a Single Page Application (SPA), or an app that manages its own routes (url paths), you’ll want to add a _redirects file to your publish directory with the following line to take advantage of browser history pushstate:
/* /index.html 200
You can read more information in our docs, which can be found here .
Please let us know if that doesn’t work for you or if there are any questions.
1 Like
kerl213
September 21, 2023, 2:54pm
3
Thank you so much to answer me @luke !
Your help was very useful to solve my issue!
SamO
September 21, 2023, 4:53pm
4
glad you found your solution! thanks for confirming.