Skip to content

Re-land /policybench vanity redirect on app-v2 - #1089

Merged
MaxGhenis merged 1 commit into
mainfrom
relanding/policybench-vanity-redirect
Jul 7, 2026
Merged

MaxGhenis merged 1 commit into
mainfrom
relanding/policybench-vanity-redirect

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

Re-lands the /policybench vanity redirect on app-v2, part of the v1 → v2 wind-down content-rescue sweep.

The /policybench and /:countryId/policybench → policybench.org vanity redirects were added to policyengine-app (v1) in #2842, merged 2026-06-16 — after app-v2 took over serving policyengine.org (the domain shift landed 2026-03-30; v1 moved to legacy.policyengine.org). So the redirect never went live. Both paths 404 on production today:

$ curl -sIL https://www.policyengine.org/policybench      → 404
$ curl -sIL https://www.policyengine.org/us/policybench   → 404

(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.ts redirects() — the authoritative layer. Verified that /pe84 resolves 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 /pe84 exists in both layers during the ongoing Vite→Next migration.
  • website/src/__tests__/config/next-config.test.ts — assert both redirect entries resolve to policybench.org.
  • changelog_entry.yaml — user-facing line.

Design notes

  • External destination, permanent: false (307) — matches the /pe84 root-vercel.json entry. Avoids browsers hard-caching a cross-domain jump if the vanity target ever moves. (v1 used window.location.replace, i.e. temporary semantics, so this preserves intent.)
  • policybench.org is country-agnostic, so both the bare and country-prefixed paths land on its root — same behavior as v1's ExternalRedirect.
  • Not a country-prefixed *.vercel.app zone rewrite, so the guard-vercel-zone-rewrites check is satisfied (verified locally: "no unauthorized zone-shaped rewrites").

Local checks

  • next-config.test.ts — 3 pass (2 new)
  • typecheck — clean
  • lint — exit 0
  • prettier --check — clean
  • vercel.json — valid JSON
  • guard-vercel-zone-rewrites — pass

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-app-v2 Ready Ready Preview, Comment Jul 6, 2026 6:22pm
policyengine-calculator Ready Ready Preview, Comment Jul 6, 2026 6:22pm
policyengine-calculator-next Ready Ready Preview, Comment Jul 6, 2026 6:22pm
policyengine-website Ready Ready Preview, Comment Jul 6, 2026 6:22pm

Request Review

This branch was successfully deployed

4 active deployments
Preview – policyengine-calculator-next — 3f994d4e Deployed Jul 6, 2026 by vercel[bot]
Preview – policyengine-website — 3f994d4e Deployed Jul 6, 2026 by vercel[bot]
Preview – policyengine-app-v2 — 3f994d4e Deployed Jul 6, 2026 by vercel[bot]
Preview – policyengine-calculator — 3f994d4e Deployed Jul 6, 2026 by vercel[bot]
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