This extension allows you to automatically turn links into custom affiliate or redirect links.
You can define a list of rules that once matched will turn the url into another value. You can then inject the original url as part of that new url.
For example you can create a rule so that every url with domain niceshop.tld
gets rewritten as https://referaldomain.tld?redirect={url}
.
This will turn links like https://niceshop.tld/amazing-product
into https://referaldomain.tld/?redirect=https%3A%2F%2Fniceshop.tld%2Famazing-product
.
You can create more advanced rules with regular expression matching and capture groups.
This extension can be installed on Flarum beta 10.x only.
composer require kilowhat/flarum-ext-affiliation-links
This extension replaces flagrow/affiliation-links and will automatically import its data.
This extension was written by Clark Winkelmann as part of a client contract and released under the MIT license in the hope that the code will be useful to others.
This extension is published on Packagist and you are welcome to install it on your own forum, however no free support is offered.
Please contact me if you are interested in contracting me to add features or update this extension.