This is my scenario : there is a source URL like this: shop/Paypal?page=2 I want to redirect to a destination that does not need any query param, like this: http://localhost:3000/shop/visacard/
I tried these two solutions: 1 - adding query matching like this :
has: [
{
type: "query",
key: "page",
},
]
but the problem is page param appears in the destination which I don't want.
2- secondly I tried to add \\
to my URL according to next js docs to ignore the Regex character and my URL was like this: shop/paypal\?page=2
in this solution, the project runs normally but redirecting does not work at all.