Configure Route Rewrites for Static Sites Deployed on vercel
This post was translated from Chinese by AI. If anything reads oddly, the Chinese original is authoritative. 中文原文
For example, add the following configuration (in nginx)
location / {
try_files $uri $uri/ /index.html;
}
Configure it in vercel
Create a vercel.json file with the following content:
{
"rewrites": [{ "source": "/:path*", "destination": "/index.html" }]
}
Then redeploy
Last updated 2024-01-14
Comments 0