Support » Plugin: Redirection » Redirect adds end of url

  • Resolved Peter023

    (@peter020)


    Hi, updating our website to elementor and gridbuilder I need to redirect the categories url.

    example from
    /category/children/

    to
    /royalty-free/?_categories=children

    But somehow redirects adds %2F, like this
    /royalty-free/?_categories=children%2F

    Anyway to prevent this?

    Many thanks

    • This topic was modified 3 months, 2 weeks ago by Peter023.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author John Godley

    (@johnny5)

    Redirection only does what you tell it to do. What are you settings for that redirect?

    Thread Starter Peter023

    (@peter020)

    Hello John,

    Source URL: /royalty-free/category/
    Target URL: http://dev.dl-sounds.com/royalty-free/?_categories=

    Only Regex enabled

    Group: Redirections

    If I use the full path of the category it is working but then I need to add redirects for 50 categories.

    Thats why I only want to redirect a part of the url.

    Thanks

    Plugin Author John Godley

    (@johnny5)

    You have enabled regex, but your source isn’t a regex. This will create problems like you are seeing.

    If you use a regex then your source needs to match the whole URL and actually be a regular expression. If you don’t need a regex then you should disable it.

    Thread Starter Peter023

    (@peter020)

    Ok, so to be clear, it is not possible to redirect part of a url? With wildcards or something?

    So I need to create a redirect for every catecory full url to the new url?
    The same will be true for tags I quess.

    Thanks

    Plugin Author John Godley

    (@johnny5)

    No, that’s not what I meant. Your regular expression needs to be an actual regular expression, and it needs match the whole URL.

    You can match categories and tags.

    You can find more details here:

    https://redirection.me/support/redirect-regular-expressions/

    Thread Starter Peter023

    (@peter020)

    Ah great, I will have a good look at it.

    Thanks John for the quick responses.

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