• Resolved darrenc66

    (@darrenc66)


    I have this regex in place ^/\d{4}/\d{2}/(.*?)\.html$ redirecting to /post-name/ – In some cases – where I’ve redirected /post-a/ to /post-b/ I tried redirecting direct from direct from, for example /2010/05/post-a.html to /post-b/ – but found that only works if a redirect from /post-a/ to /post-b/ is already in place. Is that normal? I guess it’s not a big deal, but thought one less request might be more seo and user friendly.

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

    (@johnny5)

    That does not sound like a situation caused by Redirection – no redirect will check another redirect before it is actioned.

    Thread Starter darrenc66

    (@darrenc66)

    Could it be the regex somehow taking priority if there is no redirect for /post-a/ to post-b/

    At the end of the day I have to redirect from /post-a/ to /post-b/ anyway but I just thought it strange that /2010/05/post-a.html would not redirect straight to /post-b/

    • This reply was modified 1 year ago by darrenc66.
    • This reply was modified 1 year ago by darrenc66.
    Plugin Author John Godley

    (@johnny5)

    Take priority from what? It’s hard for me to say as I don’t have a lot of information, or a way of looking at an example. The regex will do exactly as you have configured. If you have another redirect that would also match the same URL then they will be performed in order of their position values. Other things on your site may also be performing redirects.

    Thread Starter darrenc66

    (@darrenc66)

    “If you have another redirect that would also match the same URL then they will be performed in order of their position values”

    That worked, I changed the postion values so that they are before the regex, all redirect from /post-a/ to /post-b/ directly now.

    Many thanks John.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Is This Normal’ is closed to new replies.