Skip to content

Address known bug in redirects and clean up unneeded ones#781

Merged
quetzalliwrites merged 1 commit into
mainfrom
DOC-308-fix-failing-redirects
Jul 14, 2026
Merged

Address known bug in redirects and clean up unneeded ones#781
quetzalliwrites merged 1 commit into
mainfrom
DOC-308-fix-failing-redirects

Conversation

@remotesynth

Copy link
Copy Markdown
Collaborator

Changes to public/_redirects:

1. Reordered — all 9 dynamic/splat rules moved to the very end of the file, after every static rule. This is likely the actual fix for "some redirects fail" (Cloudflare Pages has a known bug where interspersed dynamic rules cause static rules after them to be silently dropped).

2. Removed 16 lines (8 unique paths × slash/no-slash) for AWS services LocalStack no longer documents at all — QLDB, MediaStore (+ -data), Elastic Transcoder. These redirected to non-existent pages either way; now they 404 directly instead of via a dead redirect.

3. Fixed 52 lines (26 unique broken targets × slash/no-slash) where the destination had rotated out from under the redirect — renamed services (kinesisanalyticskinesisanalyticsv2, resource_groupsresource-groups), a restructured SDK path (extra /net/ segment, pythonpython-boto3), and pages that moved again during later reorganizations (chaos-engineering, security-testing, lambda-tools, cloud-sandbox, app-frameworks, testing, help-support, etc.).

Net: 1,143 → 1,127 rules. Verified against a fresh astro build and one live check against docs.localstack.cloud — no new build errors introduced (one pre-existing, unrelated broken link in elb.mdx remains, not something I touched).

I did not touch the ~560 trailing-slash duplicate pairs — I initially suspected these were bloat, but testing live confirmed Cloudflare doesn't normalize trailing slashes, so removing them would reintroduce real 404s.

Resolves DOC-348

Changes to [public/_redirects](public/_redirects):

**1. Reordered** — all 9 dynamic/splat rules moved to the very end of the file, after every static rule. This is likely the actual fix for "some redirects fail" (Cloudflare Pages has a known bug where interspersed dynamic rules cause static rules after them to be silently dropped).

**2. Removed 16 lines** (8 unique paths × slash/no-slash) for AWS services LocalStack no longer documents at all — QLDB, MediaStore (+ `-data`), Elastic Transcoder. These redirected to non-existent pages either way; now they 404 directly instead of via a dead redirect.

**3. Fixed 52 lines** (26 unique broken targets × slash/no-slash) where the destination had rotated out from under the redirect — renamed services (`kinesisanalytics`→`kinesisanalyticsv2`, `resource_groups`→`resource-groups`), a restructured SDK path (extra `/net/` segment, `python`→`python-boto3`), and pages that moved again during later reorganizations (chaos-engineering, security-testing, lambda-tools, cloud-sandbox, app-frameworks, testing, help-support, etc.).

Net: 1,143 → 1,127 rules. Verified against a fresh `astro build` and one live check against docs.localstack.cloud — no new build errors introduced (one pre-existing, unrelated broken link in `elb.mdx` remains, not something I touched).

I did **not** touch the ~560 trailing-slash duplicate pairs — I initially suspected these were bloat, but testing live confirmed Cloudflare doesn't normalize trailing slashes, so removing them would reintroduce real 404s.

Resolves [DOC-348](https://linear.app/localstack/issue/DOC-348/research-the-current-state-of-redirects)
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying localstack-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 33fa5a1
Status: ✅  Deploy successful!
Preview URL: https://1d5a8582.localstack-docs.pages.dev
Branch Preview URL: https://doc-308-fix-failing-redirect.localstack-docs.pages.dev

View logs

@quetzalliwrites quetzalliwrites merged commit 79c8f56 into main Jul 14, 2026
1 of 2 checks passed
@quetzalliwrites quetzalliwrites deleted the DOC-308-fix-failing-redirects branch July 14, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants