u/Content-Platform-304

▲ 2 r/AskProgrammers+1 crossposts

React Router routes not working after page reload on Cloudflare

I'm building a portfolio website using React TypeScript and react-router and I've already deployed it using Cloudflare with a custom domain https://asdasdhasdho1212sddsa.com/home.

The problem is that when I try to open a project page or reload the page it doesn't load anything, for example, visiting this link https://asdasdhasdho1212sddsa.com/projects/the-atlas-project directly shows a blank page. The website works fine when navigate through it normally without reloading, so I think the issue is related to dynamic routing on Cloudflare but i haven't found any solutions yet. If anyone has had the same problem and know how to fix it I would really appreciate it.

Github: https://github.com/Danabess/portfolio-dev

reddit.com
u/Content-Platform-304 — 2 days ago