end up with https://someURL.fr/mypage/?someparams=true when I want https://someURL.fr/mypage?someparams=true I guess it consider the next string to be a path segment where it's just query params.
Is there any context that might help us understand?
When playing with canonical URL, sometimes you might want to exclude some query parameters (in search for example) and only generate a canonical URL with allowed parameters.
If URL contains query params A,B,C
And only A and B have effects on the search, I want to strip C from canonical URL.
Does the docs page already exist? Please link to it.
What is the update you wish to see?
https://nextjs.org/docs/app/api-reference/functions/generate-metadata#url-composition
It is written here that
This works well in most case as defined in example, but with query params not.
end up with
https://someURL.fr/mypage/?someparams=true
when I wanthttps://someURL.fr/mypage?someparams=true
I guess it consider the next string to be a path segment where it's just query params.Current workaround (using in my case next-intl)
Is there any context that might help us understand?
When playing with canonical URL, sometimes you might want to exclude some query parameters (in search for example) and only generate a canonical URL with allowed parameters.
If URL contains query params A,B,C
And only A and B have effects on the search, I want to strip C from canonical URL.
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/api-reference/functions/generate-metadata#url-composition