Routing issue on Netlify

hey there,

I have a piece of code on my website that routes me to a different route on page refresh. It works on localhost, but not on Netlify.

Its been frustrating fixing this, can someone more experienced help me out here please?

This is my website: https://omegawallet.netlify.app/

btw, going to https://omegawallet.netlify.app/error doesnt work either, even though the path exists.

btw, going to https://omegawallet.netlify.app/error doesnt work either, even though the path exists.

Single page apps need a rewrite for dynamic paths to work:

Can you share the script that routes on page refresh?

hey tom, but all my other routes work, so its kind of weird that only /error isn’t working

am I missing something?

Thats strange indeed. Can you share a repository?

yes, this is the repo:

Is appears very much related to another thread of yours @mustafakemaltoprak

The Support Guide shared by @perry there is applicable here too

I appreciate all the help, but its unfortunately not fixing the issue :confused:

could you share your _redirects file or the code from your toml file you are using to create redirects?

also, i am assuming you read this guide already?

and can you confirm that all of your redirects are being processed?

hey there, no it says " No redirect rules processed" so clearly it doesn’t find my _redirects, but I’m confused as to why all my other routes work then

I see no _redirects file in the repository you previously linked to. Netlify cannot find it because it doesn’t exist.

no I tried doing it with a manual deploy, just because I didn’t want to cluster my repo with files before I see it working

I’m just confused how every path and redirect works, but /error doesn’t

As is discussed in the Support Guide linked above and this documentation, you create a _redirects file in the public directory of the repository (for a React app) which is copied during the build process and picked up by Netlify.

If you are deploying manually this file would exist in the directory you are deploying.

thank you, it was a simple _redirects issue.

doing it with github worked, it was an issue with my manual deploy then