# Two bugs with usernames starting with subfolder name

**URL:** <https://meta.discourse.org/t/two-bugs-with-usernames-starting-with-subfolder-name/169505>\
**Category:** Bug\
**Tags:** subfolder\
**Created:** [November 7, 2020, 9:28am UTC](https://meta.discourse.org/t/two-bugs-with-usernames-starting-with-subfolder-name/169505 "2020-11-07T09:28:58Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [November 7, 2020, 9:28am UTC](https://meta.discourse.org/t/two-bugs-with-usernames-starting-with-subfolder-name/169505/1 "2020-11-07T09:28:59Z")

</div>

Setup:

- subfolder install on `/forum`
- able to reproduce both on `v2.5.4` and `tests-passed`
- a user called `forumadmin`

The user profile should be visible at `/forum/u/forumadmin/summary`  
However, when this URL is requested, a Javascript redirect is issued to `/forum/uadmin/summary`, i.e. `/forum` is being removed from the middle of the URL.

Related but different issue:  
When editing a user with a username starting with `forum`, pressing Save on the Name field results in a 404 not found, because a PUT request to `/u/forumadmin.json` is being made, instead of to `/forum/u/forumadmin.json`. So here the subfolder is being removed, but only when the username starts with the subfolder name.

I am completely unfamiliar with Ember routing so further investigation did not succeed. I vaguely recall seeing a similar bug a few weeks ago.

---

_[View the full topic](https://meta.discourse.org/t/two-bugs-with-usernames-starting-with-subfolder-name/169505)._
