# Site relative paths rewritten client side incorrectly with subfolder

**URL:** <https://meta.discourse.org/t/site-relative-paths-rewritten-client-side-incorrectly-with-subfolder/192947>\
**Category:** Bug\
**Tags:** subfolder\
**Created:** [June 7, 2021, 5:25am UTC](https://meta.discourse.org/t/site-relative-paths-rewritten-client-side-incorrectly-with-subfolder/192947 "2021-06-07T05:25:50Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)\
**Post date:** [June 9, 2021, 6:46pm UTC](https://meta.discourse.org/t/site-relative-paths-rewritten-client-side-incorrectly-with-subfolder/192947/14 "2021-06-09T18:46:33Z")

</div>

I’ve made the last commit to [get-url.js](https://github.com/discourse/discourse/blob/9f474b1c1c99c96f6b613a75854fe6cf9067e2d4/app/assets/javascripts/discourse-common/addon/lib/get-url.js), some time after the linked one.

I agree links shouldn’t be rewritten if they’re user-entered, maybe `getURL` shouldn’t be called in these scenarios? I think `getURL` is supposed to be used for Discourse default routes to “convert” them to the subfolder setup, it has some tests explicitly expecting this subfolder prepending:

> <https://github.com/discourse/discourse/blob/fc61a7c0ded02665502f879e1581109789b61048/app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js#L98-L103>

Please let me know if I can be of any help.

---

_[View the full topic](https://meta.discourse.org/t/site-relative-paths-rewritten-client-side-incorrectly-with-subfolder/192947)._
