Mapping page to multiple routes #15514
-
Hey guys, I have a dynamic route which looks like this: Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Optional Catch all routes is what you are looking for 😉 |
Beta Was this translation helpful? Give feedback.
-
I would try looking at rewrites or redirects, depending on if you want to original URL to change or not. For example, you could rewrite module.exports = {
async rewrites() {
return [
{
source: '/',
destination: '/chapters/chapter-i',
},
]
},
} |
Beta Was this translation helpful? Give feedback.
Optional Catch all routes is what you are looking for 😉
https://nextjs.org/docs/routing/dynamic-routes#optional-catch-all-routes