-
Notifications
You must be signed in to change notification settings - Fork 30.6k
Closed
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.
Description
What version of Next.js are you using?
10.2.0
What version of Node.js are you using?
12.16.1
What browser are you using?
Brave
What operating system are you using?
macOS Big Sur
How are you deploying your application?
Vercel
Describe the Bug
I'm currently using the Incremental Adoption strategy for migrate my site from Wordpress to Next this requires a rewrite for all non-existing routes to the proxy.
The problem, I have enabled the redirect from /en to /en/ or /school to /school/ however the rewrite doesn't work.
Expected Behavior
If I set trailingSlash: true in the next.config.js if the path not exists the rewrite is carried out.
To Reproduce
You can disabled the trailing slash config it works correctly. This is a example pages structure:
/src
/pages
index.tsx
[school].tsx
And the rewrite config:
async rewrites () {
return {
fallback: [
{
source: "/:path*",
destination: 'https://expanish-proxy.vercel.app/:path*'
},
],
};
},
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.