# Redirecting old URL with query string

**URL:** <https://forum.getkirby.com/t/redirecting-old-url-with-query-string/1243>\
**Category:** Questions\
**Tags:** v2\
**Created:** [June 2, 2015, 9:55am UTC](https://forum.getkirby.com/t/redirecting-old-url-with-query-string/1243 "2015-06-02T09:55:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordanmerrick](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jordanmerrick/32/1037_2.png) [@jordanmerrick](https://forum.getkirby.com/u/jordanmerrick)\
**Post date:** [June 2, 2015, 9:55am UTC](https://forum.getkirby.com/t/redirecting-old-url-with-query-string/1243/1 "2015-06-02T09:55:13Z")

</div>

I’ve recently moved from a Squarespace site to Kirby, and my old RSS feed was at `/posts?format=RSS`. My new blog is still at `/posts` though my RSS feed is now `/rss`. I’m having trouble figuring out how best to redirect the old feed to the new one. I’ve tried 301 redirects in the `.htaccess` file with no success. What’s the best way to handle this?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 2, 2015, 9:59am UTC](https://forum.getkirby.com/t/redirecting-old-url-with-query-string/1243/2 "2015-06-02T09:59:31Z")

</div>

You could use a router [http://getkirby.com/docs/advanced/routing](http://getkirby.com/docs/advanced/routing)

---

<div class="post-metadata">

**Author:** ![maxfenton](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/maxfenton/32/11996_2.png) [@maxfenton](https://forum.getkirby.com/u/maxfenton)\
**Post date:** [October 18, 2016, 4:04pm UTC](https://forum.getkirby.com/t/redirecting-old-url-with-query-string/1243/4 "2016-10-18T16:04:26Z")

</div>

I’m having a similar problem trying to figure out how to route something like the RSS link in the original post question, or (another example) `/wordpress/?p=207` =\> `forum/207`

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [October 18, 2016, 4:21pm UTC](https://forum.getkirby.com/t/redirecting-old-url-with-query-string/1243/5 "2016-10-18T16:21:20Z")

</div>

Unfortunately, you can’t use a query string in the route pattern. You can, however, use the pattern without the query string and use `get('p')` in the action function to get the post number.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 4:55pm UTC](https://forum.getkirby.com/t/redirecting-old-url-with-query-string/1243/6 "2025-02-06T16:55:00Z")

</div>

Archived on February 6, 2025, 4:55pm UTC


