-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Closed
Milestone
Description
I am using the following next config to rewrite dynamic urls to the next page pages/post/[id], which works great on my local machine (using [email protected])
// next.config.js
module.exports = {
experimental: {
async rewrites() {
return [
{
source: '/(.*)-:id(\\d+).html',
destination: `/post/:id`,
}
]
}
}
}
However, when I deploy the app to vercel I get an 404 for these routes. I am further confused with vercel routes (https://vercel.com/docs/configuration#project/routes) and rewrites (https://vercel.com/docs/configuration#project/rewrites).
Which solution should be used when hosting next.js on vercel?
Originally posted by @joafeldmann in #13347
Metadata
Metadata
Assignees
Labels
No labels