# Relative\_url\_root issues – incorrect "Latest" link, incorrect redirect

**URL:** https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266
**Category:** Bug
**Created:** [September 7, 2020, 2:57pm UTC](https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266 "2020-09-07T14:57:49Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![akvadrako](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akvadrako/32/192032_2.png) [@akvadrako](https://meta.discourse.org/u/akvadrako)
#### Post date: [September 7, 2020, 2:57pm UTC](https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266/1 "2020-09-07T14:57:49Z")

</div>

I am using discourse 2.6.0.beta1 with `relative_url_root = /forum` and I have noticed a couple issues.

One issue is that several links, for example “Latest” on the main page, point to `/latest` instead of `/forum/latest`. The links do work, but the status bar shows the incorrect value when hovering.

Another issue is that I was trying to see if I could make links to categories without the trailing number, like `/forum/c/staff`. This doesn’t work because it redirects to `/forum/forum/c/staff/3`.

They are not major problems, but I thought I would report them since it doesn’t seem like they are known bugs.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 7, 2020, 3:29pm UTC](https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266/2 "2020-09-07T15:29:51Z")

</div>

Subfolder issues do creep in. Are you on latest?

---

<div class="post-metadata">

### Author: ![akvadrako](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akvadrako/32/192032_2.png) [@akvadrako](https://meta.discourse.org/u/akvadrako)
#### Post date: [September 7, 2020, 4:20pm UTC](https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266/3 "2020-09-07T16:20:54Z")

</div>

I have just upgraded to latest and I see the same behavior.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 11, 2020, 4:04pm UTC](https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266/6 "2020-09-11T16:04:16Z")

</div>

I’m seeing admin confirmation links with the `relaztive_url_root` duplicated on 2.5.0.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [September 16, 2020, 6:45am UTC](https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266/7 "2020-09-16T06:45:15Z")

</div>

> [@akvadrako](#):
>
> I was trying to see if I could make links to categories without the trailing number, like `/forum/c/staff` . This doesn’t work because it redirects to `/forum/forum/c/staff/3` .

Fixed via:

[https://github.com/discourse/discourse/commit/32d6286bea8140329d4248f30877240244330636](https://github.com/discourse/discourse/commit/32d6286bea8140329d4248f30877240244330636)

> [@akvadrako](#):
>
> “Latest” on the main page, point to `/latest` instead of `/forum/latest` .

> [@pfaffman](#):
>
> I’m seeing admin confirmation links with the `relaztive_url_root` duplicated on 2.5.0.

I’m unable to repro both of the above issues on latest Discourse version.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 16, 2020, 2:50pm UTC](https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266/8 "2020-09-16T14:50:07Z")

</div>

Thanks, Arpit. These people (whose installation I’m not managing) are on 2.5.0. Can you help me understand where `confirm_admin_url` gets defined so that I can confirm that it’s a bug in their version of Discourse?

> [@Subfolder install: admin email confirmation url has subfolder duplicated](https://meta.discourse.org/t/subfolder-install-admin-email-confirmation-url-has-subfolder-duplicated/163749):
>
> This is on 2.5.0. The admin confirmation URL in the email has subfolder duplicated. like https://www.example.com/subfolder/subfolder/u/confirm-admin/key. I’m looking at it appears to call something called confirm\_admin\_url, but I can’t find where that’s defined. I’m not sure where to look to see if it’s a bug or some configuration issue (but this is the only place this problem is showing up).

> <https://github.com/discourse/discourse/blob/main/app/mailers/admin_confirmation_mailer.rb#L12>

Thanks.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [September 16, 2020, 3:05pm UTC](https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266/9 "2020-09-16T15:05:38Z")

</div>

> [@Subfolder install: admin email confirmation url has subfolder duplicated](https://meta.discourse.org/t/subfolder-install-admin-email-confirmation-url-has-subfolder-duplicated/163749):
>
> This is on 2.5.0. The admin confirmation URL in the email has subfolder duplicated. like https://www.example.com/subfolder/subfolder/u/confirm-admin/key. I’m looking at it appears to call something called confirm\_admin\_url, but I can’t find where that’s defined. I’m not sure where to look to see if it’s a bug or some configuration issue (but this is the only place this problem is showing up).

I just replied on above topic. 🙂

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [September 17, 2020, 8:49am UTC](https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266/10 "2020-09-17T08:49:21Z")

</div>


