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 Omega Wallet doesnt work either, even though the path exists.
btw, going to Omega Wallet 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?
Is appears very much related to another thread of yours @mustafakemaltoprak
https://answers.netlify.com/t/page-crashes-upon-page-refresh/68171
The Support Guide shared by @perry there is applicable here too
I appreciate all the help, but its unfortunately not fixing the issue
perry
June 21, 2022, 5:26pm
9
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?
Last checked by Netlify Support Team: September 2023.
Introduction
You’ve put blood, sweat and tears into building an incredible static site with all the bells and whistles. However, you’ve configured some redirect rules and you’ve come unstuck… they don’t appear to be working!
Ensure you’ve followed the correct guidance
Our redirects and rewrites document covers a broad range of use cases, from status codes to proxying another service and everything in between.
Ensure you’re using the correc…
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