Skip to content
Discussion options

You must be logged in to vote

If anyone does come across this post and is looking for the answer, I've managed to work it out.

Basically, like (blog) -> blog, you will want to create a website directory inside of (website). Now in my case, I did not want users to see the word "website" in the url because that is a terrible user experience. I ended up using rewrites in the next config to internally route requests that don't contain "blog" to /website, so next.js knows where to route them, and the user has no idea that under the hood, it's routing via /website.

async rewrites() { return [ { source: "/:path((?!blog/).*)", destination: "/website/:path*", }, ]; },

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rickbeermier-racwa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant