Is it possible to do url rewrite like Nextjs in middleware?

Want to build a white-label solution and would like to use a similar approach using middleware to rewrite to a directory based on the host for example. https://github.com/vercel/platforms/blob/main/middleware.ts
GitHub
platforms/middleware.ts at main · vercel/platforms
A full-stack Next.js app with multi-tenancy and custom domain support. Built with Next.js App Router and the Vercel Domains API. - vercel/platforms
2 Replies
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
puchesjr
puchesjr5w ago
I’m aware there is middleware, it can we rewrite to the path/directory? I guess I’ll poke around and see what I can get working