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?
@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.
Thank you so much to answer me
Your help was very useful to solve my issue!
glad you found your solution! thanks for confirming.