• Hi,

    I’d like to redirect /checkout/ to /account/ in case a user types it in manually. However, I would need the plugin to honor query parameters, e.g., /checkout/?item=1, and exclude those URLs from the rule.

    When I set up a redirect from /checkout/ to /account/, and a user clicks on the actual checkout link, it will result in /account/?item=1, which, of course, won’t work.

    Is there a way to create a redirect that only redirects the page if it’s just /checkout/ while ignoring the redirect if the URL has query parameters, or is that technically not possible?

    Thanks much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Godley

    (@johnny5)

    Sure, you can ignore query parameters. The support guide has all the information:

    https://redirection.me/support/matching-a-url/

    Thread Starter jfbprivate

    (@jfbprivate)

    Thanks for the quick response.

    The documentation doesn’t really mention the case. I have tried all these options but they’re not working for me.

    I quote, “For example, if your source URL is /my-old-post and your target URL is /my-new-post, and the user requests /my-old-post?tracking=1 then the redirected URL will be /my-new-post?tracking=1

    That is exactly what I don’t want.

    I need /checkout/ to redirect to /account/. And /checkout/ only. For example, I need /checkout/?item=1 to be excluded from the rule.

    However, in your example above this would redirect to /account/?item=1 instead, which is what I don’t want since it would break the link.

    The idea is that users are not supposed to access /checkout/ itself. The same is true for /confirmation/. These pages don’t make sense without their respective query parameters.

    Thanks again.

    • This reply was modified 5 months, 1 week ago by jfbprivate.
    Plugin Author John Godley

    (@johnny5)

    The support page mentions ‘Ignore all query parameters’.

    Thread Starter jfbprivate

    (@jfbprivate)

    “Ignore all query parameters” would actually do the opposite of what I need it to do.

    Anyway, I got it working now. “Exact match in any order” was the correct setting, but I had to uncheck the “Ignore Slash” option. I had tried that earlier and it didn’t work then. Might have been a caching issue.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.