# 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:** 11

<div class="post-metadata">

**Author:** ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)\
**Post date:** [10 februari 2021 om 20:38 UTC](https://meta.discourse.org/t/link-rewriting-for-affiliate-codes/52949/11 "2021-02-10T20:38:04Z")

</div>

While this works elegantly for links that are made manually, by linking a word to [https://website](https://website), it doesn’t seem catch links that are automatically generated by Discourse’s parser. In other words:

This works: [Google](http://google.com)  
But this does not: [Google.com](http://Google.com)

Can the script be improved to also catch the automatically generated links?

---

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