AOSSIE-Org / AOSSIE-Org/OrgExplorer

[BUG]: Refreshing on any non-root route (e.g. /settings) returns GitHub Pages 404

未關閉
#105 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
JavaScript
星號
34
分支
92
平均合併
8 天 7 小時
30 天內合併 PR
12

描述

### Bug Description

Navigating to any page other than the home page (e.g. Settings) works fine
when reached by clicking links inside the app. However, refreshing the
browser while on that route, or opening that URL directly/in a new tab,
returns GitHub Pages' native 404 page instead of loading the app -and it
does not redirect back to the home page either.

This is likely because the app uses client-side routing (react-router-dom),
but GitHub Pages has no rewrite rule to fall back to index.html for unknown
paths, so direct requests to non-root routes 404 at the hosting level before
React Router ever gets a chance to handle them.

### Steps to Reproduce

1. Go to https://orgexplorer.aossie.org/
2. Click through to the Settings page (or any non-home page)
3. Refresh the browser (F5), or copy the current URL and open it in a new tab
4. Observe GitHub Pages' 404 "File not found" page instead of the app

### Logs and Screenshots

Image

### Environment Details

- OS: Windows 11
- Browser: Chrome 120
- Node.js: v24.13.0

### Impact

Medium - Feature works but has issues

### Code of Conduct

- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates

貢獻指南

開啟貢獻指南

研究方向

Inspect the deployment configuration and the react-router-dom route entry points; first reproduce the problem by refreshing /settings on the deployed GitHub Pages site. Done means direct visits and browser refreshes on /settings and other non-root routes load the app instead of GitHub Pages' 404 page.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
github, javascript, react
領域
devops, frontend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
64/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。