404.html redirects drop URL fragments, so old handbook deep links lose their anchor

未關閉 適合新手
#1,035 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
90/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
html, javascript
領域
frontend

研究方向

從重新導向迴圈以及 layouts/404.html 中的 window.location.replace(target) 開始。檢查目標網址如何建立,接著使用包含查詢字串和片段的 URL 重現問題。重新導向保留兩者,且深層連結範例能跳至對應錨點時,即為完成。

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

描述

layouts/404.html redirects old underscore paths such as /replication_handbook/ to their hyphenated replacements, but it drops the URL fragment and query string. A link to a specific table or figure therefore lands at the top of the chapter.

To reproduce (Chrome, 5 Nov 2026): open https://forrt.org/replication_handbook/planning.html#tbl-rep-types. It ends at https://forrt.org/replication-handbook/planning.html, without #tbl-rep-types. The same happens with discussion.html#fig-success-interpretation.

Where: window.location.replace(target) in the redirect loop in layouts/404.html. The fix is to append window.location.search + window.location.hash to target.

Why it matters: FORRT teaching materials still link to these old anchored addresses, so they lose the deep link. The server also returns HTTP 404 before the script runs, so link checkers report these links as dead even though browsers reach the page.

主要語言
HTML
星號
42
分支
33
平均合併
16 小時 3 分鐘
30 天內合併 PR
121

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

forrtproject/forrtproject.github.io 的其他 Issue

查看 forrtproject/forrtproject.github.io 的全部 Issue

相似的 Issue

更多 Web Dev Issue

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

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