From 9e0218794aab2a18efe55f341c17b185fa6315ad Mon Sep 17 00:00:00 2001 From: Adrian Llopart Date: Sun, 21 Jun 2026 11:08:22 +0200 Subject: [PATCH] fix(routing): rewrite client routes to "/" not "/index.html" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous catch-all rewrite pointed at /index.html, but with cleanUrls:true Vercel generates a 308 redirect rule for /index.html (it's not a servable path — only / is), so the rewrite never resolved and /privacy still 404'd in production. Verified with Vercel's own @vercel/routing-utils: destination "/" routes /privacy through the filesystem handler to index.html (200) while keeping the URL as /privacy, with /api/* excluded and static assets unaffected. / -> 200 (index.html) /privacy -> 200 (index.html, pathname preserved -> App renders Privacy) /assets/*.js -> 200 (real file) /api/contact -> function (untouched) Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_0138qS6baPZutQ7s2fMbfNv3 --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index d6df3a7..ef6a717 100644 --- a/vercel.json +++ b/vercel.json @@ -4,7 +4,7 @@ "outputDirectory": "dist", "cleanUrls": true, "trailingSlash": false, - "rewrites": [{ "source": "/((?!api/).*)", "destination": "/index.html" }], + "rewrites": [{ "source": "/((?!api/).*)", "destination": "/" }], "headers": [ { "source": "/(.*)",