Replies: 1 comment
-
Similar RFCs/docs from other frameworks: Astro Remix
SvelteKit And a pretty nice post that explores the feature in various frameworks: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Flexible rewrites similar to NextJS'
NextResponse.rewrite
which helps many SaaS developers offer multi tenant and dynamic platforms. The goal is to provide developers with a powerful tool to dynamically modify routing behavior based on various conditions, such as hostnames, paths, or custom logic.As it stands, there's no simple way to include multi-tenancy/ custom domain routing / or conditional path rewrites for those building such applications. And it's been agreed across the board that NextJS have the upper hand on this. By introducing a built-in rewrite mechanism that can be added within middleware, this should break down a lot of walls.
The proposal is for a
rewrite
option to the TanStack Router/Start configuration. This option would allow developers to define rules for rewriting routes based on various conditions.A great example would be the Vercel Multi-tenant template they provide. Example
Another reference would be the NextResponse documentation
So, if
redirect
works like this:rewrite
could work like this:Beta Was this translation helpful? Give feedback.
All reactions