# Redirects on load remove URL parameters

**URL:** https://meta.discourse.org/t/redirects-on-load-remove-url-parameters/282136
**Category:** Bug
**Created:** [October 13, 2023, 11:39am UTC](https://meta.discourse.org/t/redirects-on-load-remove-url-parameters/282136 "2023-10-13T11:39:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [October 13, 2023, 11:39am UTC](https://meta.discourse.org/t/redirects-on-load-remove-url-parameters/282136/1 "2023-10-13T11:39:28Z")

</div>

Noticed this a while ago, just remembered it.

Sometimes, I publicly post links on our forum to a theme preview link so others can see new changes before they’re applied to all themes. I’ll give out a link like: [https://amcforum.wiki/t/author-badges-theme-component-side-wide/2262?preview\_theme\_id=56](https://amcforum.wiki/t/author-badges-theme-component-side-wide/2262?preview_theme_id=56)  
Which is long, so I’ll try to shorten it to: [https://amcforum.wiki/t/2262?preview\_theme\_id=56](https://amcforum.wiki/t/2262?preview_theme_id=56)  
But that doesn’t work, because when it redirects to the full topic URL it strips off the preview theme.

The same thing occurs with [safe mode](https://meta.discourse.org/t/53504?silent=true) query params.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [October 16, 2023, 9:40pm UTC](https://meta.discourse.org/t/redirects-on-load-remove-url-parameters/282136/4 "2023-10-16T21:40:35Z")

</div>

Someone with a better understanding of our routing will hopefully chime in… but this might be more of a feature request than a bug.

I’m not sure query parameters were ever intended to be included with those short links — my understanding is that when a short link is used the application checks for the permalink, and redirects to that… so the query param would need to be lifted off the short link and reapplied to the permalink to get this working.

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [October 17, 2023, 3:19am UTC](https://meta.discourse.org/t/redirects-on-load-remove-url-parameters/282136/7 "2023-10-17T03:19:38Z")

</div>

Interesting, I didn’t know it worked that way.

(Likely due to that same functionality) if a topic’s title changes, the same issue/behavior occurs.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [October 18, 2023, 1:40am UTC](https://meta.discourse.org/t/redirects-on-load-remove-url-parameters/282136/8 "2023-10-18T01:40:40Z")

</div>

This has been fixed in

[https://github.com/discourse/discourse/pull/23965](https://github.com/discourse/discourse/pull/23965)

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [October 18, 2023, 2:51am UTC](https://meta.discourse.org/t/redirects-on-load-remove-url-parameters/282136/10 "2023-10-18T02:51:46Z")

</div>

Does that fix also apply to `safe_mode` params?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [October 30, 2023, 12:00am UTC](https://meta.discourse.org/t/redirects-on-load-remove-url-parameters/282136/11 "2023-10-30T00:00:52Z")

</div>

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