Hi @preetcomm
Unfortunately, Shopify doesn’t support query parameters (? and &) in redirects, which is the reason you’re facing this problem.
However, there is a workaround to handle this situation using JavaScript on your 404 error page.
First, create a new page template in your Shopify theme, for example, “page.404.liquid”. Copy the content of the “page.liquid” template to the new “page.404.liquid” template.
Next, add the following JavaScript code at the end of the “page.404.liquid” file, before the closing </body> tag:
Replace the example URL in the redirectToMap object with your specific URLs. You can add more redirects by adding new lines with the format '/old-url': '/new-url',
Create a new page in your Shopify admin with the title “404” and assign it to the “page.404” template. You can leave the content of the page empty.
Go to Online Store > Navigation > URL Redirects, and remove any unsuccessful redirects that you have created earlier.
Finally, go to Online Store > Preferences > scroll down to the “404 error page” section, and select the “404” page you created earlier.
Now, when someone visits an old URL that isn’t redirected, they will be redirected to the corresponding new URL based on the JavaScript code added to the 404 error page.