On hard refresh on subpages, I get a 404 #1

Closed
opened 2025-11-05 12:05:01 +00:00 by gosam · 1 comment
Member

Switching to HashRouter in src/main.tsx:3 keeps routing client-side even when the server can’t rewrite deep links, so CMD-clicked links now load correctly in new tabs. The only visible change is URLs now include # (e.g. /#/product). If you prefer clean URLs later, configure the server for SPA rewrites and swap back to BrowserRouter.

AI first said the production server should reconfigured but fixed it by adding # to the urls it looks like

e.g. https://www2.projectmycelium.com/#/cloud

I don't know if this is the right or best way to fix it but it should work for now

- Go to any subpage on staging, e.g. https://www2.projectmycelium.com/cloud - Hard-refresh, and you should get a 404 page - Emre said he has a fix for this: > Switching to HashRouter in src/main.tsx:3 keeps routing client-side even when the server can’t rewrite deep links, so CMD-clicked links now load correctly in new tabs. The only visible change is URLs now include # (e.g. /#/product). If you prefer clean URLs later, configure the server for SPA rewrites and swap back to BrowserRouter. > > AI first said the production server should reconfigured but fixed it by adding # to the urls it looks like > > e.g. https://www2.projectmycelium.com/#/cloud I don't know if this is the right or best way to fix it but it should work for now
sashaastiadi was assigned by gosam 2025-11-05 12:05:01 +00:00
sashaastiadi added this to the OW Website & Wiki Project 2025 project 2025-11-07 16:09:39 +00:00
sashaastiadi moved this to In Verification in OW Website & Wiki Project 2025 on 2025-11-07 16:13:40 +00:00
Owner

i think its done pls check @gosam

i think its done pls check @gosam
sashaastiadi moved this to Done in OW Website & Wiki Project 2025 on 2025-11-17 16:57:59 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ourworld_web/www_projectmycelium_com#1
No description provided.