My working regex gets altered…

[ad_1]

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 26 minutes ago by HabD.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer