Skip to content

πŸ› Redirect bare subproject roots (/projects/etl β†’ /projects/etl/)#7

Merged
lucasrodes merged 1 commit into
mainfrom
fix-bare-project-root
Jun 7, 2026
Merged

πŸ› Redirect bare subproject roots (/projects/etl β†’ /projects/etl/)#7
lucasrodes merged 1 commit into
mainfrom
fix-bare-project-root

Conversation

@lucasrodes
Copy link
Copy Markdown
Member

Written by Claude Code β€” @lucasrodes at the wheel.

Found right after the cut-over (owid/etl#6151): docs.owid.io/projects/etl (no trailing slash) 404s β€” the SUBPROJECTS match is startsWith("/projects/etl/"), so the bare root falls through to the umbrella's static assets. This also breaks legacy links like /projects/etl/en/latest, whose /en/latest strip 301s onto the bare root.

Fix: 301 the bare prefix to the slash form before the proxy match. Deeper slash-less paths are unaffected (the proxied Pages project already 308s those itself).

Verified pre-fix behavior:

404  /projects/etl
404  /projects/owid-grapher-py
301 β†’ /projects/etl (β†’404)  /projects/etl/en/latest
308 β†’ …/getting-started/    /projects/etl/getting-started  (already fine)

/projects/etl (no slash) fell through to the umbrella assets and 404ed.
Also un-breaks legacy /projects/etl/en/latest links, whose /en/latest
strip lands on the bare root.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lucasrodes lucasrodes merged commit 188d9e6 into main Jun 7, 2026
1 check passed
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.

1 participant