Reformat link structure to match WordPress

I migrated a blog from Weebly to WordPress and we have links in Facebook to the old URL structure Weebly used for Posts. This portion /1/post/ and .html is causing a 404 in WordPress.

Is there a way using 301 Redirect to remove the parts of the URL that are causing the issue. Or using the template redirect hook and regex inside WordPress to fix this?

Weebly
example.com/1/post/2016/09/some-post.html

WordPress
example.com/2016/09/some-post/

Read more here: Reformat link structure to match WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *