Skip to content

Commit cfffc50

Browse files
bfirshclaude
andcommitted
Add Vercel SPA routing config to fix 404 on direct navigation
Vercel returns 404 when navigating directly to routes like /run/:slug because it looks for a matching file on disk. This rewrite rule tells Vercel to serve index.html for all routes, letting React Router handle client-side routing. Equivalent to the existing Netlify _redirects file. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7468b30 commit cfffc50

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

web/vercel.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"rewrites": [
3+
{
4+
"source": "/(.*)",
5+
"destination": "/index.html"
6+
}
7+
]
8+
}

0 commit comments

Comments
 (0)