301 redirect that preserves (passes through) the query string

There's currently no way to create a 301 redirect that preserves all query parameters. This is useful for urls' that have a lot of potential querystrings that might come in various order.


How it works today:


E.g. given the following 301 redirect set up in webflow:


old path: /old-url(.*)

redirect to: /new-url%1


and a user that enters /old-url?foo=bar


will have the user redirected to /new-url


How it's expected to work

The query string is preserved and the user ends up on /new-url?foo=bar

  • Christer Persson
  • Jul 25 2021
  • Reviewed
  • Riziki Nielsen commented
    07 Oct 15:04

    I know this is an old item, but just wanted to share that this is in fact possible, but the old path needs an escaped question mark first:

    Old path: /old-url%?(.*)
    Redirect to: /new-url?%1

    This will resolve /old-url?foo=bar to end up at /new-url?foo=bar