Redirects, in our case with geolocated IP address to get taxes right. The following works fine for urls without any params. Makes sure people in Spain land on the Spain payment page, and everybody else on the UK payment page.
<% if URI(request.original_url).path == '/subscriptions/spain' %>
if (x.country.iso_code !== "ES"){window.location.replace('/subscriptions/new');}
<% elsif URI(request.original_url).path == '/subscriptions/new' %>
if (x.country.iso_code == "ES"){window.location.replace('/subscriptions/spain');}
[…etc. etc.…]
<% end %>
But how do I do the same thing with params? How do I redirect, say
subscriptions/new?c=tree
to
subscriptions/spain?c=tree
Thanks.