Repository navigation
[fix](website) Prevent Apache 500 errors from oversized redirect rules - #4566
Merged
morningman merged 1 commit intoOct 31, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Archiving the historical documentation made thousands of aliases point to the same archive page. The publication optimizer combined each destination's aliases into one
RewriteRule, producing a 263,259-byte line in the artifact from run 41149820126. Apache rejects.htaccesslines above 8,190 characters, so uncached website requests returned HTTP 500 while cached pages still showed the old 2.1 navigation entry.This change splits grouped redirects into complete directives of at most 8,000 UTF-8 bytes, including escaped paths, targets and flags. It applies to both root and static-resource controls. Individual redirects that cannot fit fail the build. The existing publication verifier also rejects oversized control lines, including continued lines, before the artifact can be uploaded.
Validation
DORIS_TEST_APACHE=true node --test scripts/publish/__tests__/*.test.cjs: 30 passed, zero skips. New regressions cover 9,000 archive/asset aliases across five locales, UTF-8 byte limits, oversized individual sources/targets, nested controls, continued lines, query/fragment handling and real Apache responses.node --test scripts/__tests__/build-locales.test.cjs: 11 passed, including preservation of the previous artifact after publication verification fails.NODE_OPTIONS=--max-old-space-size=2048 node scripts/publish/verify-fixture.cjs --apache: five-locale Rspack production fixture and Apache HTTP checks passed.8321964locally, using its actual homepage/archive HTML and placeholder redirect destinations. The original controls reproduced HTTP 500 withLine too long; regenerated controls have a maximum line length of 8,000 bytes. All ten locale homepage/archive requests returned 200, and 479 sampled redirect requests matched their expected status and destination.git diff --check: passed. The full website build is left to the existing Build Check workflow.Self-review
Versions
Languages
The common publication path also covers Japanese, Korean and Russian. No per-language documentation edits are required.
Docs Checklist