• 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=$1

    And 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/$1

    which should work but the other is taking precedence.

    Something I am missing? Thanks!

    https://www.ads-software.com/plugins/redirection/

  • The topic ‘Permalink redirection with regex picks up more than it should’ is closed to new replies.