• Resolved Jason A.

    (@thathostingco)


    We are trying to redirect /staging/blog/2022/06/29/guide-to-coming-up-with-high-quality-blog-content/ to /staging/guide-to-coming-up-with-high-quality-blog-content/ but am coming up empty on the results and hitting the 404.

    We have tried our source as:
    ^\/\staging\/\blog\/\d{4}\/\d{2}\/\d{2}\/(.*)
    ^/staging/blog\/\d{4}\/\d{2}\/\d{2}\/(.*)
    ^\/\blog\/\d{4}\/\d{2}\/\d{2}\/(.*)
    ^\/\d{4}\/\d{2}\/\d{2}\/(.*)
    ^\/\staging\/\blog\/\d{4}\/\d{2}\/(.*)
    ^\/\d{4}\/\d{2}\/(.*)
    ^/staging/blog\/\d{4}\/\d{2}\/(.*)
    ^/blog\/\d{4}\/\d{2}\/(.*)
    ^\/\blog\/\d{4}\/\d{2}\/(.*)

    However, we have not to been able to get it working. We have this set as priority 0 so as to make it run first, as there are other redirections. What are we missing?

    • This topic was modified 3 years, 8 months ago by Jason A..
    • This topic was modified 3 years, 8 months ago by Jason A..

    The page I need help with: [log in to see the link]

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

    (@johnny5)

    You can find details about regular expressions here (including examples):

    https://redirection.me/support/redirect-regular-expressions/

    You seem to have sprinkled \ arbitrarily in most of the expressions above. A lot of them aren’t necessary and are probably causing problems. I would advise using https:://regex101.com to help you create and test an expression.

    Your expression needs to match the whole path, not just part of it.

Viewing 1 replies (of 1 total)

The topic ‘blog redirection from folder perspective.’ is closed to new replies.