# Reverse Proxy rewrites domain in external links in posts

**URL:** <https://meta.discourse.org/t/reverse-proxy-rewrites-domain-in-external-links-in-posts/83078>\
**Category:** Support\
**Created:** [3월 15, 2018, 2:58오후 UTC](https://meta.discourse.org/t/reverse-proxy-rewrites-domain-in-external-links-in-posts/83078 "2018-03-15T14:58:19Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![tpavliuk](https://avatars.discourse-cdn.com/v4/letter/t/d6d6ee/32.png) [@tpavliuk](https://meta.discourse.org/u/tpavliuk)\
**Post date:** [3월 15, 2018, 2:58오후 UTC](https://meta.discourse.org/t/reverse-proxy-rewrites-domain-in-external-links-in-posts/83078/1 "2018-03-15T14:58:20Z")

</div>

Hello!

We have forum installed in subfolder: `https://i.materialise.com/forum/`

We have problem with external links in posts. When user clicks on external link, he gets redirect to URL with our main site domain with path and query string from original URL, but not to original URL.

For example:

User gets `https://i.materialise.com/watch?v=%3cvideo_id`, instead of original link to Youtube: `https://youtube.com/watch?v=%3cvideo_id)`

And this behavior reproduces for any external links. Open in new tab via context menu and mouse middle button click works well.

I did some investigation and found that on click on link, we call, for example: `https://i.materialise.com/forum/clicks/track?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dk-r-zmItM0Q` and ServiceWorker redirects us to URL `https://i.materialise.com/watch?v=k-r-zmItM0Q` with status code 302. I spent a lot of time on this forum and didn`t find any idea what can be wrong with settings.

We have many complaints from community members and I will be very appreciate for any assistance or advice how to solve this problem.

Thanks.

---

_[View the full topic](https://meta.discourse.org/t/reverse-proxy-rewrites-domain-in-external-links-in-posts/83078)._
