Rewrite help
Unanswered
Hamiltonstövare posted this in #help-forum
HamiltonstövareOP
I have these nextjs config rewrites:
Problem:
When I go to https://beta.unknown.com/search its fine, but when go to the same URL with query params it redirects to the proxied discover page https://beta.unknown.com/discover/search?sortby=usestoday&sortdir=desc
{
source: "/search",
destination: "https://search.unknown.com/discover/search",
},
{
source: "/search/:path*",
destination: "https://search.unknown.com/discover/search/:path*",
},
{
source: "/discover",
destination: "https://search.unknown.com/discover",
},
{
source: "/discover/:path*",
destination: "https://search.unknown.com/discover/:path*",
}Problem:
When I go to https://beta.unknown.com/search its fine, but when go to the same URL with query params it redirects to the proxied discover page https://beta.unknown.com/discover/search?sortby=usestoday&sortdir=desc