• Resolved joseph_t

    (@joseph_t)


    Hi Guys,

    I’ve noticed that when a URL is set up to redirect to a page with this plugin, adding a query string to the original URL will cause the URL to not get caught by the redirect and will instead throw a 404.

    Is there any way to alter the plugin so that it handles URL matching when query strings are involved?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Aaron

    (@aaron13100)

    Hey Joseph,

    You could use a regular expression for this. Go to Settings -> 404 Solution -> Page Redirects -> “Add a Redirect” (button) to get to the “Add a Manual Redirect” section. Then check the “Treat this URL as a regular expression” checkbox. Then use the base URL that you want redirected and add “.+” to the end of it, to end up with something like “/base_url/.+”

    Does that help?

    Thread Starter joseph_t

    (@joseph_t)

    Thanks for getting back to me so quickly.

    I’ll give that a go now. Is it possible to preserve the query string so that it is appended to the destination URL?

    Plugin Author Aaron

    (@aaron13100)

    Ahhhhh….. I’m pretty sure I didn’t think of that when I wrote that part. Let me know how it goes and if it doesn’t work then give me some examples of what it would do if it did work.

    Thread Starter joseph_t

    (@joseph_t)

    Hi Aaron,

    Unfortunately while the redirect works, it doesn’t preserve the query string.

    I assume this is because the function that handles the redirect redirects to exactly the URL in the destination field.

    Thread Starter joseph_t

    (@joseph_t)

    On an unrelated note, if you edit a RegEx redirect, it gets converted to a manual redirect.

    Plugin Author Aaron

    (@aaron13100)

    Please try version 2.6.2 and let me know how it goes.

    Thread Starter joseph_t

    (@joseph_t)

    Hi Aaron,

    Thanks a lot for pushing out an update so quickly, everything appears to be working perfectly now.

    Thanks again
    Joseph

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Redirects with query strings’ is closed to new replies.