I have deployed a React website to Github Pages. Problem is that only the landing page is working and every other page gives an “404 file not found” error. The website is working fine on localhost.
Github project: https://github.com/Gnabriel/ethereum-pos-prototype
Website https://gnabriel.github.io/ethereum-pos-prototype/ is working but redirects to https://ellebrink.me/ethereum-pos-prototype/app/dashboards/overview which does display the page BUT if you refresh that page you will get the 404 error.
If you click on the “Become a validator” button and try to go to the next page you will, again, get the 404 error. This button redirects to https://ellebrink.me/app/dashboards/generate which I think is incorrect. I guess it should be something like https://ellebrink.me/ethereum-pos-prototype/app/dashboards/generate.
I followed this guide on how to deploy my React app to Github Pages.
In my package.json, should I use
since I am using a custom domain?
I have very little knowledge of React and this website is built with a complete React theme with many frameworks that I do not understand. From my research I think the problem lies with the routing of the website.
Can you confirm if the problem is with the routing and if so, guide me on how to fix it?
Huge thanks in advance!