Is this the way to do wildcard redirects?

I have read 301 redirects | Webflow University but Im still a bit confused.

In a WordPress site that I’m moving to Webflow, my posts urls start with the year, for example:
esmoscu.com/2020/post1
esmoscu.com/2020/post2
esmoscu.com/2020/post400

So, I want to redirect all my posts under esmoscu.com/2020/… to esmoscu.com/blog/

Is this the correct way to do it?
Old path: /2020/(.*)
Redirect to path: /blog/%1

Any help will be greatly appreciated.

Yes that’s correct. Just make sure that the post slug stays the same as it was on WordPress, or it won’t redirect

Thanks for your reply. A little confirmation is reassuring :grin:

I just realize that I probably need to keep the “2020” in the new slug.

Because the current WordPress url is like this:
esmoscu.com/2020/10-learning-tips

So, the new webflow url should be like this:
esmoscu.com/blog/2020/10-learning-tips

Hence,
Old path: /2020/(.*)
Redirect to path: /blog/2020/%1

Am I on the right track?

Yeah that seems right.

Hi everyone,

I’m facing a similar case, though it seems slightly more complex. The slugs of my blog posts in WordPress all start with the full date. E.g.,https://www.saent.com/2015/01/02/habits-of-habits/.

In Webflow, this will become http://www.saent.com/blog/habits-of-habits. How should I set up a 301 redirect for this?

Thanks in advance for your help!
Tim

Hey @Tim_Metz, to prevent conflicts with the rest of your site I think I’d create one for each year like this;

/2015/(.*)/(.*)/(.*)/blog/%3

/2016/(.*)/(.*)/(.*)/blog/%3

/2017/(.*)/(.*)/(.*)/blog/%3