Permalink redirection with regex picks up more than it should
-
Using version 2.4.2 of plugin.
Using Redirection to 301 old permalinks (archives/0000) to new (post-name-slug). So:
domain.com/archives/999 –> domain.com/the-post-slug
I use regex like this:
Source URL: /archives/(\d*) (regex checkbox on)
Target URL: /?p=$1And it works well. HOWEVER, it also picks up tag and category URLs like this:
domain.com/archives/tag/my-favorites –> domain.com/?p=tag/my-favorites
which, of course, does not work.
According to https://www.phpliveregex.com, the rule should ignore expressions without digits, but Redirection does not.
I expected to add another rule:
Source URL: /archives/tag/(\D*)
Target URL: /tag/$1which should work but the other is taking precedence.
Something I am missing? Thanks!
- The topic ‘Permalink redirection with regex picks up more than it should’ is closed to new replies.