-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect Manager: Combining redirect query parameters with external query parameters #3509
Comments
@juliaetate Good point - there's definitely room for improvement here. Firstly, I'd like to move
It'll see what I can do. BTW, there is a related thing: in the current implentation
and then a request with a query string will drop the fragment, e.g.
I'd say the fragment should be preserved and the redirect should be
The PR is coming soon. |
…target with query string in the request
@YegorKozlov Moving the option to the redirect screen is interesting, but I would love to also see the merge option as part of the OSGi configurations if that's possible. With potentially thousands of redirects managed by multiple different people, having to remember to manually change a setting each time could lead to user errors unless there's a better control on the default. |
@juliaetate the OSGi flag needs to be boolean for compatibility reasons. We can't turn it into a drop-down. I'm fine to change the default behavior to merge query strings though. |
@YegorKozlov Thank you so much for looking into all of this so quickly. What are the next steps here on the ACS side? When will this change become part of ACS Commons? |
@juliaetate it'll be included in 6.11 @davidjgonzalez Are there any plans for releasing v6.11 soon? I have a number of redirect PRs to include. |
AEM As a Cloud Service: Adobe Experience Manager 2024.11.18751.20241128T090041Z
ACS AEM Commons Version: 6.5.0
When we have a redirect set up with a query parameter in the destination URL and go to the URL on our AEM instance, the query parameter works fine. When this redirected URL is posted to social media where site-specific tracking is added to the URL such as Facebook adding the fbclid parameter, the query parameter within the Redirect Manager is not maintained but the fbclid parameter is. If we turn off Preserve Query String, then the query parameter within the Redirect Manager is maintained but the fbclid is lost.
When a page is created within AEM with a redirect, and that page's URL is shared to social media such as Facebook, the fbclid is appended to the link. When the redirect occurs, the redirected URL contains both the parameter from the redirect URL AND the additional parameters from the initial URL clicked. If the vanity URL https://www.domain.com/redirect points to https://www.domain.com?a=1&b=2 and then https://www.domain.com/redirect is posted to Facebook where fbclid is appended, then the destination URL becomes https://www.domain.com?a=1&b=2&fbclid=xyz.
With the redirect manager, we can either get https://www.domain.com?a=1&b=2 OR https://www.domain.com?fbclid=xyz depending on the status of preserveQueryString.
Is there any way to have the redirect manager merge the two query parameters like an AEM redirect page rather than having to choose between the redirect query parameters or the incoming query parameters?
Through the dispatcher, if a destination URL has a query parameter, that is used instead of an incoming one. Even that behavior would be preferable with preserveQueryString enabled. If https://www.domain.com/page.html redirects to https://www.domain.com?a=1&b=2 but the external link has a query parameter appended such as https://www.domain.com/page.html?fbclid=xyz, we would prefer to see the final destination have the defined destination parameters instead of the external one, ie https://www.domain.com?a=1&b=2, if they cannot be merged the way a page redirect would work.
The text was updated successfully, but these errors were encountered: