Ghost Version : Latest, updated just before trying redirects
Host : DigitalOcean Droplet
I’ve recently started a project where I need to redirect links from my site to external links, but the redirect does not include the parameters that I am including. Here is my redirects.json : [ { "from": "/ref/offer-name-here", "to": "https://www.external-site.com/products/product-name-here?ref=reference-name-here", "permanent": true } ]
Anything after the ? does not send. It just sends to the link : https://www.external-site.com/products/product-name-here
Is there a way to include the reference parameter?
A workaround for this problem would be to make an .hbs file that contains some javascript that does the redirect you want, and then use routes.yaml to make /search go to that .hbs page. Use javascript to get the query parameters and then redirect the user to the correct /search/param page.
And just to be clear… you’re saying in your example at you want to redirect FROM permanent-redirect-from TO untitled. So you have a page/post on your site at {yoursitename}/untitled , right?