• Resolved fohteh

    (@fohteh)


    We used have .com/category/xxx/yyy/ category with pagination number.

    And those pagination numbers giving 404s

    I have to redirect all the pagination numbers belongs to a category to updated category pagination numbers.

    For instance, I want all the pages belongs to xxx category to be redirected to their desired page numbers

    like from

    .com/category/xxx/yyy/page/2/
    to

    .com/category/000/page/2/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author John Godley

    (@johnny5)

    Thread Starter fohteh

    (@fohteh)

    Hello John

    I read all the page there actually.

    So I came up with this

    source: /category/xxx/yyy/(.*)
    target: /category/ooo/$1

    but it doesnt work!

    Plugin Author John Godley

    (@johnny5)

    That works for me. Ensure you have checked the regex checkbox and have cleared your browser cache

    Thread Starter fohteh

    (@fohteh)

    Hi John

    You were right. They are working! 2 Questions

    1- Should I use the carat character for the target url too?
    2- Should I remove the main direction after adding the pagination redirect?

    source: /category/xxx/yyy/
    target: /category/ooo/

    Thanks

    Plugin Author John Godley

    (@johnny5)

    No, the carat is a regular expression character, and target is not a regular expression. I’m not sure what you mean about removing the main redirection?

    Thread Starter fohteh

    (@fohteh)

    Before we apply for the regex below

    source: ^/category/xxx/yyy/(.*)
    target: /category/ooo/$1

    we were using only main redircetion as below

    source: /category/xxx/yyy/
    target: /category/ooo/

    Since the regex works now, should we remove the main redirections? Or keep them?

    • This reply was modified 5 years, 9 months ago by fohteh.
    Plugin Author John Godley

    (@johnny5)

    Sure, there’s no need to have the other one there as it will be covered by the regular expression.

    Thread Starter fohteh

    (@fohteh)

    Thank you John

    You have been very helpful!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘I can not redirect old page numbers to updated page numbers’ is closed to new replies.