amazon tracking link redirect loop #79
Replies: 1 comment
|
@rrotter Thanks a lot for letting me know that! It seems that Handling Amazon URLs is getting harder now, since we have to manage multiple parameters that can appear in different orders. So, I now think it’s time to rely mainly on capture-group processing, allowing us to deal with each parameter sequentially. Like this:
This is the screenshot of the rule: It looks a bit awkward but should work fine without any performance problem. I'll dive into it a bit more later on, but I'm sure I'll submit it soon. By the way, thanks again for your report and the improved rule! If you're happy, could I add you as a contributor to the rule in the library? Thanks! |
Uh oh!
There was an error while loading. Please reload this page.
fyi, I was getting a redirect loop yesterday w/ the amazon tracker stripping rule. Amazon kept adding
psc=1in addition toth=1. I addedth=1&psc=1to the redirect, only to get another redirect loop of amazon trying to removepsc=1today! So I added the following exclude pattern which should deal with both situations:https://(www\.)?amazon\.(com|(com?\.)?[a-z][a-z])/dp/[^/?#]+\?th=1(&psc=1)?(#.*)?I don't know whether my experience yesterday was a fluke or if psc=1 is a new parameter that we'll see more (or maybe they'll start adding other parameters), so not sure if this is something you'd want to add right away vs. waiting for more user reports.
Also note, I greatly simplified the tld pattern vs. the original rule because domain false positives don't really matter for an exclusion rule.
All reactions