Link breaks when target URL ends in slash
I recently relaunched a website and we're encountering some issues with links from Marketo back to URLs on the website. We've created a set of redirect rules using Regular Expressions which has worked well except for instances where the URL ends in a slash '/'.
It seems Marketo is inserting a '?' before the querystring when a URL ends in a character other than a slash, which is great, but if there's a '/' at the end, no slash. In this case, the URL structure looks like a deeper directory and my website throws a 404.
For example,
These work:
www.mysite.com/a-really-cool-destintion/?mkt_tok=1234
www.mysite.com/a-really-cool-destintion?mkt_tok=1234
This does not:
www.mysite.com/a-really-cool-destintion/mkt_tok=1234
The problem I have is that about 50% of links form Marketo point back to my website are URLs ending in a '/'.
Is there a way to force the use of a '?' before 'mkt_tok' ?