Redirects with query strings not working?
I noticed that redirects lead to 404 page when the link is accessed from a Facebook post. Apparently, Facebook appends a tracking parameter ?fbclid=* to the url and it messes up the redirect. Is there a way around this?
Interesting – I haven't run across this before. Appending an additional query to a URL shouldn't in theory break anything on Blot. Would you mind contacting us with a few example URLs that are breaking and we'll take a look.
I looked into it further. It seems to only affect WebKit-based browsers. I can’t replicate the behaviour on Chrome and Firefox on macOS. Sent you an email. (Hope it doesn’t get flagged for spam because of the very long Facebook link)
The issue turned out to be: Blot's redirects treat query strings as part of the URL path, e.g. consider this redirect:
from: /foo
to: /bar
The above redirect will not match the following requests:
/foo?fbclid=x
/foo?bar=baz
The solution was to create the following redirect:
from: /foo?(.*)
to: /bar
I will consider ignoring querystrings but need to make sure this won't cause other issues.