Mautic changes link including & and returns 404

Hi support,

When I use a link that includes ampersand & such as https://domain.com/cart_php=?a=add&pid=229 Mautic transforms it into https://domain-mautic.com/r/66372e926da490a539c7fbb2a?ct=YTo1OntzOjY6InNvdXJjZSI7[...]jc6ImNoYW5uZWwiO2E6MTp7czo1OiJlbWFpbCI7aTo3Mjt9fQ%3D%3D& which in turn redirects to https://domain.com/cart_php=?a=add&pid=229 giving the error in the browser:

https://mail.google.com/ /cart_php=?a=add&pid=229 customers.domain.com Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36 404

Is it possible that Mautic doesn’t recognise the & character because it changes it in one of the links to ? and it stops working as a link?

If I shorten the initial link https://domain.com/cart_php=?a=add&pid=229 with bitly or whatever, then it works, but if I use the original one that includes & it stops working.

Shouldn’t the links with & used in shopping carts or checkout pages work?

Any thoughts on this? :thinking:

Mautic 4.3.1
nginx: 1.16
PHP: 7.4
MariaDB: 10.3.32

Regards!

1 Like

Has anyone experienced this or something similar with the use of & in links that Mautic reinterprets?

:hugs:

Yes, we just came across this when referencing internal Sharepoint files so the “…m / : b : / t…” [I had to put spaces in-between to stop it converting in this viewer] part of the URL is changed to
2022-07-12_6-45-09 and seems to be converted to %F0%9F%85%B1 in the URL which causes it to have a 404

We are running 4.1.1.

Thanks for the idea of using a redirection URL as a work around!

1 Like