amplify-hosting
amplify-hosting copied to clipboard
Redirect to www url along with query string params
If there's a way out to preserve query string parameters when a non www url redirects to www url. Please consider the following use case to understand it better.
We have an amplify react application and we are passing some random codes in query string parameters and those random codes will help us to identify some important information regarding the customer at some later stage. But query string parameters are removed when a customer comes from a non www url.
for example : https://abc.com/some-keyword/?param1=test¶m2=test2 >> It must redirect to https://www.abc.com/some-keyword/?param1=test¶m2=test2
Please let us know how this can be done using amplify rewrite and redirect headers.
Here is the app details : App Id : d280tc8bca7hos App region : ap-southeast-2
Thanks,