2 Replies Latest reply on Apr 19, 2018 8:55 AM by David Paradis

    Link breaks when target URL ends in slash

    David Paradis

      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:




      This does not:



      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' ?

        • Re: Link breaks when target URL ends in slash
          Sanford Whiteman

          Unless a bug has recently been introduced, this should work fine.


          Let's look more deeply at what you're doing. Please post the original HTML (just relevant snippet of course) with the link and then the rewritten link at your tracking server.

            • Re: Link breaks when target URL ends in slash
              David Paradis

              Thanks Sanford. We just determined the issue and it actually has to do with our redirect rules. Marketo is actually inserting and & in there.


              The original URL in Marketo has a structure like this



              The new site URL is built like this



              Marketo sees the existing ? and then appends the querystring to preface with &. When it gets to my site, this is happening:


              This causes a 404.


              I'm going to just append my redirect rule so that for these pages it'll end in '/?'


              Thanks for looking to help!