# Link interception issues with subfolder setup?

**URL:** https://meta.discourse.org/t/link-interception-issues-with-subfolder-setup/74404
**Category:** Support
**Created:** [26 Giugno 2017, 1:52pm UTC](https://meta.discourse.org/t/link-interception-issues-with-subfolder-setup/74404 "2017-06-26T13:52:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rohmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rohmann/32/120852_2.png) [@rohmann](https://meta.discourse.org/u/rohmann)
#### Post date: [26 Giugno 2017, 1:52pm UTC](https://meta.discourse.org/t/link-interception-issues-with-subfolder-setup/74404/1 "2017-06-26T13:52:50Z")

</div>

Hopefully this helps anyone running into a similar problem. Our subfolder/reverse proxy site involved some custom markup (header/footer/etc) where we have links to other sites on the same domain (behind the same reverse proxy). We ran into some link interception issues where if a user clicked `https://example.com/another-site` they were taken to `example.com/forum/another-site/`.

This modification solved it for us:

```plaintext
var DiscourseURL = require('discourse/lib/url').default;

DiscourseURL.reopen({
  routeTo: function(path, opts) {

    if ( ! this.isInternal(path) ) {
      window.location = path;
      return;
    }

    return this._super(path, opts);

  }
});

```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [20 Novembre 2017, 6:21am UTC](https://meta.discourse.org/t/link-interception-issues-with-subfolder-setup/74404/2 "2017-11-20T06:21:33Z")

</div>

@neil is this an open bug on tudiabetes?

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [20 Novembre 2017, 2:54pm UTC](https://meta.discourse.org/t/link-interception-issues-with-subfolder-setup/74404/3 "2017-11-20T14:54:25Z")

</div>

@sam TuDiabetes decided not to use a subfolder setup anymore and have moved to a subdomain.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [21 Novembre 2017, 12:37am UTC](https://meta.discourse.org/t/link-interception-issues-with-subfolder-setup/74404/6 "2017-11-21T00:37:39Z")

</div>

I am not seeing this issue on [Forum Jeux vidéo - Gamekult](https://www.gamekult.com/forum/) which is a forum we host. The custom header links just fine to other parts of the domain.

Can you still repro this @rohmann?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [27 Novembre 2017, 7:00am UTC](https://meta.discourse.org/t/link-interception-issues-with-subfolder-setup/74404/8 "2017-11-27T07:00:36Z")

</div>

This topic was automatically closed after 6 days. New replies are no longer allowed.
