Overwrite the route similar way with NextJS middleware rewrite() #3996
Unanswered
lpph64-official
asked this question in
Q&A
Replies: 1 comment
-
same as #3188 can you please add to that RFC? |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks,
I am using the Tanstack Router (File-Based Routing) to build the multi-tenant SaaS.
routes/
├── index.tsx # Root domain index (https://root.io)
├── sign-in.tsx. # Root domain sign-in (https://root.io/sign-in)
└── tenant
└─── index.tsx # Subdomain index (https://tenant-name.root.io)
└─── sign-in.tsx # Subdomain sign-in (https://tenant-name.root.io/sign-in)
Expectation:
From subdomain:
✅ https://tenant-name.root.io -> /routes/tenant/index.tsx
✅ https://tenant-name.root.io/sign-in -> /routes/tenant/sign-in.tsx
❌ https://tenant-name.root.io/tenant -> /routes/tenant/index.tsx
❌ https://tenant-name.root.io/tenant/sign-in -> /routes/tenant/sign-in.tsx
It's kind of similar with Next.js middleware rewrite
I have tried to use the Code-based Route. It works, but I would like to use the File-based instead, how can I do that?
Beta Was this translation helpful? Give feedback.
All reactions