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


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: