Configure Route Rewrites for Static Sites Deployed on vercel
- Published
- Views
- 113
- Comments
- 0
- Words
- 23
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