Re-land /policybench vanity redirect on app-v2 - #1089
Merged
Merged
Conversation
The /policybench and /:countryId/policybench vanity redirects to policybench.org were added to policyengine-app (v1) in #2842 after v2 took over serving policyengine.org (domain shift, 2026-03-30), so they never went live — both paths 404 on production today. Re-land them on the Next.js website host: - website/next.config.ts redirects() — the authoritative layer (this is where /pe84 resolves on prod, verified via 308 → /us/pe84). - vercel.json (root) — mirror, matching how /pe84 exists in both layers. - Cover both entries in website/src/__tests__/config/next-config.test.ts. External destination and permanent: false (307), matching the /pe84 root vercel.json entry — avoids browsers hard-caching a cross-domain jump if the vanity target ever moves. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Summary
Re-lands the
/policybenchvanity redirect on app-v2, part of the v1 → v2 wind-down content-rescue sweep.The
/policybenchand/:countryId/policybench→ policybench.org vanity redirects were added to policyengine-app (v1) in #2842, merged 2026-06-16 — after app-v2 took over servingpolicyengine.org(the domain shift landed 2026-03-30; v1 moved tolegacy.policyengine.org). So the redirect never went live. Both paths 404 on production today:(The PolicyBench launch blog post from the same launch kit, #2841, is not affected — it was independently landed on v2 and is live at /us/research/introducing-policybench.)
Changes
website/next.config.tsredirects()— the authoritative layer. Verified that/pe84resolves here on prod (308 → /us/pe84), so this is where the redirect must live to take effect.vercel.json(root) — mirror the redirect, matching how/pe84exists in both layers during the ongoing Vite→Next migration.website/src/__tests__/config/next-config.test.ts— assert both redirect entries resolve topolicybench.org.changelog_entry.yaml— user-facing line.Design notes
permanent: false(307) — matches the/pe84root-vercel.jsonentry. Avoids browsers hard-caching a cross-domain jump if the vanity target ever moves. (v1 usedwindow.location.replace, i.e. temporary semantics, so this preserves intent.)policybench.orgis country-agnostic, so both the bare and country-prefixed paths land on its root — same behavior as v1'sExternalRedirect.*.vercel.appzone rewrite, so theguard-vercel-zone-rewritescheck is satisfied (verified locally: "no unauthorized zone-shaped rewrites").Local checks
next-config.test.ts— 3 pass (2 new)typecheck— cleanlint— exit 0prettier --check— cleanvercel.json— valid JSONguard-vercel-zone-rewrites— pass🤖 Generated with Claude Code