Replies: 0
Am I doing something wrong or does the regex redirect not allow linking offsite? The use case is when we want to create a regex url that links to a page but passes through an affiliate marketing tag that some affiliates allow having in their affiliate links to tag your affiliate purchases for different marketing channels. Like this:
Source: /tpr-tdp-kindle-(.*)
Target: https://www.amazon.com/Duality-Principle-Portland-Rebels-Book-ebook/dp/B06XZXVMFH/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=$1&linkId=574d8fe130772b5db55885935e752fed
Notice the $1 in the target. This rule ends up redirecting to:
http://www.domain.com/https:/www.amazon.com/Duality-Principle-Portland-Rebels-Book-ebook/dp/B06XZXVMFH/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=test&linkId=574d8fe130772b5db55885935e752fed
Where http://www.domain.com is the wordpress site domain.
I need to do this so I can have one rule for dozens of affiliate links with marketing tags used throughout our traffic sources.
I don’t see why the plugin author would not allow regex to be used for linking to offsite resources because it would be simple to support and probably only a line or two of code in the area the redirect happens so I imagine I must be doing something wrong.
Can someone weigh in on this that knows the plugin and let me know if this was an intended result or if I have my redirect wrong? If it is not currently supported I wonder if the author would accept a pull request from me if I change the tool to allow this. Since my time is limited, if their are active developers, let me know if you are willing to modify this plugin and add a pull request in Github and how much you would charge. I know it’s not guaranteed to be included in the software but I would prefer it so my redirects don’t break during upgrades. If it’s a good price I will just have someone else do it.
Thanks!