• Resolved HabD

    (@habd)


    Hi, I used https://regex101.com to get my expression running. The goal ist to substitute a part of the url for all post of a custom post type and redirect them to a new custom post type.

    to find the source URLs I use:

    \/old_old\/(.*) 

    and to direct it I use:

    /acf-cb-marke/$1

    According to Regex101 this works fine. But when I paste the first term into a Redirection directive it says:

    • The source URL should probably start with a /
    • Remember to enable the “Regular Expression” option if it is a regular expression.

    Do I have to delete the escaping backslashes though the Reg101 says they are needed?

    And the second seems important – but I do not find any option to set (in the German version of the plugin). Using: Version 5.3.10?

    Also the “$”-sign gets an error hint:

    • Your target URL contains the invalid character %(invalid)

    Any yes, it is “$” and it quotes a “%” ???

    Where is the error?

    Kind regards, Martin

    • This topic was modified 1 year, 5 months ago by HabD.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Godley

    (@johnny5)

    Do I have to delete the escaping backslashes though the Reg101 says they are needed?

    Regex101 only says they are needed if you use / as a delimiter. Redirection doesn’t need this.

    The regex option is available in all versions of the plugin:

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

    Thread Starter HabD

    (@habd)

    Also without (both) backslashes it does not work! And there are still the two hints (in German):

    • Remember to enable the Regular Expression option if it is a regular expression.
    • Your target URL contains the invalid character % (invalid)

    Currently I really do not get the point what is not working… Will say: Help is super-welcome!

    Plugin Author John Godley

    (@johnny5)

    Also without (both) backslashes it does not work!

    The backslashes are not needed.

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

    Thread Starter HabD

    (@habd)

    Okay, I got it! Found it! Sorry! On the very dar right side I now saw the option to set (bot on the option page…). Sorry, my blind eyes! Any yes, not all works the best!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘My working regex gets altered…’ is closed to new replies.