Skip to content

🔨 301 legacy /en/latest URLs to canonical paths#4

Merged
lucasrodes merged 1 commit into
mainfrom
redirect-rtd-en-latest
May 19, 2026
Merged

🔨 301 legacy /en/latest URLs to canonical paths#4
lucasrodes merged 1 commit into
mainfrom
redirect-rtd-en-latest

Conversation

@lucasrodes
Copy link
Copy Markdown
Member

Written by Claude Code — @lucasrodes at the wheel.

Inbound links from blog posts, Slack threads, bookmarks etc. use the ReadTheDocs URL shape (/en/latest/...). Strip that segment in the umbrella _worker.js so those links keep resolving once docs.owid.io cuts over to CF.

from to
/en/latest/ /
/projects/etl/en/latest/ /projects/etl/
/projects/etl/en/latest/anything.html /projects/etl/anything.html
/projects/owid-grapher-py/en/latest/foo /projects/owid-grapher-py/foo

Returns a 301 so search engines + browser caches converge on the canonical URL, then subproject routing happens on the rewritten path.

Existing inbound links from blog posts, Slack, bookmarks etc. point at
the ReadTheDocs URL shape (/en/latest/...). Strip that segment in the
umbrella router before subproject routing so links continue to resolve
on docs-cf.owid.io and the eventual docs.owid.io cut-over.

Examples:
  /projects/etl/en/latest/                → /projects/etl/
  /projects/owid-grapher-py/en/latest/x   → /projects/owid-grapher-py/x
  /en/latest/                             → /

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lucasrodes lucasrodes merged commit 4c8a764 into main May 19, 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