# Amazon link rewriting for affiliate codes

**URL:** <https://meta.discourse.org/t/amazon-link-rewriting-for-affiliate-codes/12174>\
**Category:** Feature\
**Created:** [24 يناير 2014، 5:40م UTC](https://meta.discourse.org/t/amazon-link-rewriting-for-affiliate-codes/12174 "2014-01-24T17:40:26Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![geek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/geek/32/102154_2.png) [@geek](https://meta.discourse.org/u/geek)\
**Post date:** [24 يناير 2014، 5:40م UTC](https://meta.discourse.org/t/amazon-link-rewriting-for-affiliate-codes/12174/1 "2014-01-24T17:40:26Z")

</div>

As far as I know there is no way in Discourse to handle rewriting Amazon links, which leads to me double-checking to make sure people aren’t trying to pull a fast one when they do post an Amazon link.

This could happen in one of two ways (or both):

- Add code to strip all affiliate codes from any Amazon URL
- Add code to replace and/or add affiliate codes into any Amazon URL.

I know this happened over at StackExchange a long time ago, so I’m guessing it’s probably fairly easy to do.

I’m not personally that worried about adding the affiliate codes, but it would be nice to make sure that other people aren’t adding them to their links, and I’m guessing it would be a really good feature for forum owners that want to make money from links on their forum.

---

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