So, i got a react website, and i am getting an page not found error when refreshing a path that is different from the domain, my domain is https://www.thegeekawaken.com, and if i go to https://www.thegeekawaken.com/postFront/postFront1 i get this error, if i go through my app, everything is fine, but if i refresh the page, obviously, i get the same error. I read for some things that might help me, like define the rules on my _redirects, and i did, but i still getting the same error.
Link to my repo: GitHub - NunoObjr/websitenetlify.
hi there, before we dig in, did you see this brand new guide on debugging redirects?
I strongly suggest you give it a thorough read through and see if this fixes your problem:
if not, please post again, and we’ll try and troubleshoot.
Hi, so, it did not work, i tried to follow not only this one but many guides, but nothing worked, i dont know if i am not understanding, or if i need to change my app navigation to something different.
Hey @juniorobertran,
Is this your netify.toml file? websitenetlify/netlify.toml at master · NunoObjr/websitenetlify · GitHub
If so, there are several issues with that which will prevent redirects from working. Your redirects in a netlify.toml need to look like this (including indentation!):
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
force = false
Here’s a sample file:
Let us know if re-formatting and naming the headers [[redirects]]
instead of [[headers]]
helps!
Thanks, that worked as expected, i did not noticed my headers, thanks again.