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

Đang mở Phù hợp với người mới
#1,035 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
90/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
html, javascript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với vòng lặp chuyển hướng và window.location.replace(target) trong layouts/404.html. Kiểm tra cách đích được tạo, sau đó tái hiện bằng một URL có chuỗi truy vấn và fragment. Hoàn tất khi các lần chuyển hướng giữ nguyên cả hai và các ví dụ liên kết sâu dẫn đến đúng anchor.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
HTML
Star
42
Fork
33
Merge trung bình
17 giờ 18 phút
Pull request đã merge (30 ngày)
111

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của forrtproject/forrtproject.github.io

Tất cả issue của forrtproject/forrtproject.github.io

Issue tương tự

Thêm issue về Web Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.