Support » Plugin: Redirection » Redirect and keep query string

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Wp-user865966


    Just wanted to add that the URL’s could be totally different. The query string could be on any given URL.

    Plugin Author John Godley


    Currently you will need to use a regular expression for this. A future version of the plugin will make it simpler.


    Is there any indication when in the future the plugin will make it simpler?
    I am asking because I think it would also resolve this issue:

    We have thousands of redirects and are weighing the decission if we should wait for the plug-in to update or to manually change all the redirects to be regular expressions.

    Same issue here.

    Please extend your plugin with this functionality.

    Happy with paid addon, even 😉


    Plugin Author John Godley


    Just a note that there is now an alpha version of the plugin which allows you to ignore query parameters without regular expressions:

    If you are able to test then I’d appreciate any feedback on Github, or direct at

    Thank you for making the alpha available, it seems to be working for me, but we’ve yet to do some more testing.

    In order to have it affect existing redirects, do I change the value of match_data to
    {"source":[]} ?

    We have thousands of redirects, so manually changing each one is not preferred when a query like this would do the trick:

    UPDATE wp_redirection_items SET match_data= ‘{\”source\”:[]}’

    • This reply was modified 2 years, 4 months ago by Tharkon.
    • This reply was modified 2 years, 4 months ago by Tharkon. Reason: Trying to get ` working within a codeblock
    Plugin Author John Godley


    You can set defaults from the options page. Your above SQL shouldn’t be necessary.

    I did set the default query matching, but it is only effective for new redirects made after the option is set. Existing redirects keep the Exact match all parameters in any order setting, even when match_data is empty. I tested it with an existing redirect as well and it would not work until I manually changed the individual setting.

    Plugin Author John Godley


    Ok, then that would be a bug. I will try and reproduce and then add a test and fix.

    Plugin Author John Godley


    Fixed in alpha 2, available from the same URL.

    Hi, just wanted to confirm – has this been rolled into 3.7.2?

    If not – do we have a timeline on this release?

    Many thanks!

    Plugin Author John Godley


    It will be released with 4.0, which will be after the 3.7 branch is done.

    I have the same issue. It’s good to know about the new plugin version.

    I was just wondering what the correct regular expression was to use to keep the query string?

    I have redirected some URLs today with Facebook query strings in the format to
    Using the expression
    Source: ^/wrong-url/.*
    Target: /right-url/

    But I’m guessing that removing the query from the URL will mean removing that Facebook referral data from Google Analytics.

    Can you advise?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Redirect and keep query string’ is closed to new replies.