Join Free
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
  1. #1

    not resolving to same url in a specific deep link case

    I found an unusual case where the link affiliator doesn't resolve to the url I'm giving it, and wrong=url of course = no potential commision.

    This a case where I'm using a php header(location: $url) to go to the site.

    The direct url is:

    which resolves to a page with 15 results.

    If I turn this into an affiliate link, DESPITE the exact same url it ends up on a different page:
    NOTE: This forum changes the url from what I am posting which makes the discussion confusing. It is replacing e%2Fshd%2B with e/shd/+ but I am actually using the encoded version of each.

    The culprit appears to be the %2B portion of the url. The affiliator conversion drops that off after the Fshd

    If you go directly to these links (as opposed to going through the php header command) it still is ending up dropping off the %2B and ending up on the wrong page.
    Last edited by tedm; 05-11-2015 at 08:16 PM.

  2. #2

    URL Encoding
    All parameter values must be URL encoded. Failure to do so may result in unexpected results from the API. Refer to the documentation of the programming language you are using for more information on URL encoding.

    Try (with a valid api key of course)

  3. #3
    Thanks. I know you must get tired of telling people that the URL must be encoded. The urls originally were encoded but the 'GET' takes it out in the program which then uses the header command. After discovering that yesterday I tried to 're-encode' in various ways but without success before posting.

    I tried your link. I pulled up the html page source to make sure I'm doing it right. Here is what I'm using (space after the h so you can see the exact usage), but it is not going to the page. Ignore the space in score and in Start -- the forum inserts those despite them not being in my post:

    h ttp:// artDate%3D%26WhenEndDate%3D

    If you copy and past this and insert your own api key you will see that it doesnt work.

    Basically, it looks like when using the php header (ie command header('Location: ' . $tourl ) ) instead of a hyperlink then the rules are different. Unfortunately I can't figure out what rule will make it work in this case. I suspect you will need to test this yourself using the header command to find a solution that works in conjunction with your conversion of the url.

    In addition to your suggestion,
    I've tried:
    encoding the entire url (it goes to my domain first),
    encoding the entire part after the first ?
    encoding the entire part after the second ?
    encoding according to these to 2 links all of the parameters after the second ? except for = and &

    MOST work without encoding at all, but some like this one for scorebig clearly require something, but what should it be?
    Last edited by tedm; 05-12-2015 at 10:14 AM.

  4. #4
    I see what you're saying. Hopefully Andrew will notice it too. Even if we URL encode the above url, because scorebig is expecting e%2Fshd%2B and not the unencoded version that's sent through after being redirected by Prosperent, it doesn't pick up the search results.

    Andrew, it's being url encoded correctly on ted's side, but as soon as it's redirected from your side, it's unencoded, and because the site is looking for an encoded piece, doesn't show the search results. Tested this on my side.

  5. #5
    When it is getting decoded, it ends up with a + instead of %2B. We might be able to fix it by rawurldecode, but not at the expense of breaking other urls. I'll have to play around with it.

  6. #6
    thanks this a case where the merchant has characters they shouldn't have in their url? If so I can either contact them and see what they say about changing it or default to a different, less relevant but still valid, page.

    Just curious about this though:

    If you are ending up with a + why isn't that + showing up the address bar you are then going to?

    It seems like if you are sent %2B it would decode to %2B. That's what happens here:
    Last edited by tedm; 05-12-2015 at 11:26 PM.

  7. #7
    What's happening is the merchant is expecting an unencoded version, ie %2B. They then (in their code) change it to +

    On your side, you are url encoding the URL, but because %2B is already encoded, it doesn't "re-encode" that.

    When the link is then sent to Prosperent to redirect through their system, the url you encoded gets decoded. This INCLUDES %2B, which then turns into a + and the + is sent to the merchant. Because the merchant is expecting a %2B and not a +, the results aren't found and that's the page you get.

    This is a scenario where url encoding parameters already exists within the url you're sending to, there's no double encode/decode as I've explained, so when Prosperent decodes it, it decodes the entire thing. That's what Andrew said about rawurldecode, because (I believe) it doesn't decode the parameters when redirecting from here

  8. #8
    Thanks very much for explaining. You said the merchant changes it to a +, but that's not happening in my address bar--the browsers are showing a %2B. I"m assuming you mean something else but its not clicking at the moment.

    I don't wish to cause problems for Prosperent. I'm guessing few of their users use the header command so probably they haven't faced this issue before. Most of this merchants similar pages don't have the %2B, only some do for some strange reason. My last post about decoding a %2B to a %2B was just wrong..after a long day I wasn't thinking right and really don't get what that link was trying to do now--or maybe it just doesn't work like it claims, obviously %2B should decode to a +...

    Seems like unless Prosperent wants to add a param for users to tell them NOT to decode something then there is no good solution
    Last edited by tedm; 05-13-2015 at 09:08 AM.

  9. #9
    Yea, as I mentioned the merchant, in their backend code, changes the %2B to +, not in the address bar

  10. #10
    where or why would they be changing it? Say I go to their site with %2B in the url. It doesn't appear to be redirected to a + since by doing so it would be in the address bar, so I don't know what you mean. And since the category is a select option dropdown within a form I'm assuming their code is set to go straight to a url with %2B in it. Most of the category choices just dont have a %2B or a + in it so those pose no problem.
    Sorry if I'm just being dense here..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
coupons | coupons and deals