Catch All routes and domain proxy #17504
Unanswered
soymanuvalle
asked this question in
Help
Replies: 0 comments
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.
-
Hello, I'm trying to point multiple domains to different paths of my app using Catch All routes.
My structure
What I expect to happen:
With the setup mentioned above I would like to see the same page from http://localhost:3000/home and http://test.com but I get the following error from NextJS Router when I access using the proxied domain:

My source-code:
Screenshots
http://localhost:3000/home
http://test.com
I've tried without Catch All routes and it works, but catch all routes are required for my project...
It's rendering correctly on both domains (proxied and localhost):

I would like to know if there is something I'm doing wrong or if there is a bug on the Catch All routes system. Apparently the error is that there is a missing parameter for the
[...slug].js
page, which makes sense since the /home parameter is being proxied, is there any workaround to make use of Catch All routes with multiple domains?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions