Replies: 5 comments 2 replies
-
|
Hi, thanks for opening this issue! I noticed this problem a while ago and attempted to fix it using I’ve struggled to find a clean solution because this behavior is specific to GitHub Pages and how it handles static hosting. At this point, migrating to a different hosting platform may genuinely be the simplest long-term fix — but I want to explore all reasonable options first. Important The documentation site is not affected by this issue. What I believe is happeningGitHub Pages only serves static files. When a user refreshes or directly visits a client-side route like: GitHub Pages tries to locate a corresponding static file: When it can’t find one, it returns a server-side 404. At that point, GitHub Pages redirects to the root of the domain (which doesn’t host anything for this project): This explains why the app works perfectly when accessing: The Tip You can inspect exactly what GitHub Pages is serving by looking at the Why the docs site worksThe documentation site is built with Docusaurus, which generates fully static HTML files for every route at build time. That means GitHub Pages always finds a matching file, so no 404 occurs. This strongly suggests the issue is not React-specific, but a limitation of static hosting + client-side routing. Possible solutions (and trade-offs)1. Fixing the
|
Beta Was this translation helpful? Give feedback.
-
|
This issue has turned into a broader discussion around hosting strategy, routing, and long-term architecture (SPA fallbacks vs SSR vs migration). Since there isn’t a single clear “bug fix” here, I’m going to convert this to a Discussion so we can gather opinions and recommendations without treating it as a blocking issue.
|
Beta Was this translation helpful? Give feedback.
-
|
@Ryan-Millard , one approach which i have personally used to resolve this is , to have pros: Let me know your thoughts 💡. |
Beta Was this translation helpful? Give feedback.
-
|
The Thank you for your help with this, @manu-059! |
Beta Was this translation helpful? Give feedback.
-
|
It seems like the best fix is to use the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your issue
The issue is whenever user refresh a page other than the landing page (https://ryan-millard.github.io/Img2Num/about), 404 page not found is shown. The site works locally , this issues happens only in production.
Steps to reproduce
What was the expected result?
Put here any screenshots or videos (optional)
Notice the URL and the page (unrelated to the Img2Num).

Would you like to work on this issue?
Yes
Beta Was this translation helpful? Give feedback.
All reactions