Bart Veneman

Creator of Project Wallace, analytics for CSS. <noscript>-fanboy. Serverless clearfix engineer. I can lift node_modules twice my own weight.

Vercel's rewrites syntax

You can use the :placeholder syntax in both the source and the destination in Vercel's rewrites configuration. In this example I'm using a user ad project placeholder to pass into the destination as part of the query string.

{
"version": 2,
"rewrites": [
{
"source": "/~:user/:project/settings",
"destination": "/projects/settings?project=:project&user=:user"
}
]
}

Tags