# Link rewriting for affiliate codes

**URL:** <https://meta.discourse.org/t/link-rewriting-for-affiliate-codes/52949>\
**Category:** Feature\
**Created:** [16 november 2016 om 02:51 UTC](https://meta.discourse.org/t/link-rewriting-for-affiliate-codes/52949 "2016-11-16T02:51:40Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![daath](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daath/32/115536_2.png) [@daath](https://meta.discourse.org/u/daath)\
**Post date:** [16 november 2016 om 02:51 UTC](https://meta.discourse.org/t/link-rewriting-for-affiliate-codes/52949/1 "2016-11-16T02:51:40Z")

</div>

I saw this and was thrilled:

> [@Amazon link rewriting for affiliate codes](https://meta.discourse.org/t/amazon-link-rewriting-for-affiliate-codes/12174/52):
>
> I’m happy to announce that we’re developping an official affiliate plugin for discourse It only works for amazon right now but more will come later wink

Then I installed it, and realized that it still only works for Amazon. Would it be hard to add support for ShareASale? Maybe even a “generic” rewrite where you regex an URL and do a replacement?

---

_[View the full topic](https://meta.discourse.org/t/link-rewriting-for-affiliate-codes/52949)._
