301 Redirects for Blogs with Month and Year Folders

As the name suggest, I need to change:

/blog/2016/04/how-a-stop-doing-list-is-helping-to-advance-our-company-1

to:

/blog/how-a-stop-doing-list-is-helping-to-advance-our-company-1

I couldn’t make heads or tails of the 301 Redirect resource page.

In other words, I need to eliminate the month and year folders. Anyone know how to accomplish this?

I don’t think my Read-Only link is needed since this isn’t in the designer?

Jose

@Waldo or @PixelGeek, do you guys know of any solutions?

Thank you for the mention and great question! I know that creating 301 re-directs can definitely be challenging, especially with multiple capture groups.

In your case, you would need to create the following redirect:
/blog/(.*)/(.*)/(.*)

to

/blog/%3

If you had another folder level, you’d go to %4.

Please let me know if this is helpful! :man_bowing:

2 Likes

@Waldo That worked like a charm. Thanks so much! I was pulling my hair out for about an hour before I took to the forum. Appreciate it!

Jose

1 Like