We have 200+ blog posts that we will be slowly moving over from our old website to the new website on Webflow.
Two things: The blog posts on Webflow are in a different folder (/post vs. /blog) and a lot of them will have different slugs than on the old website. And we will be re-publishing only a few posts a week, not moving them all at once.
I know how to do redirects on Webflow, including wildcard redirects, but what I’m trying to do is:
as we re-publish the blog posts on Webflow, keep adding redirects for individual blog posts:
/blog/post1 redirect to /post/newpost1
and at the same time:
for any blog posts that we haven’t yet re-published on Webflow, have a general redirect to the main blog page:
/blog/(.*) redirect to /blog
Is something like this possible?
If not, what’s the best way to handle these redirects, assuming we don’t want to re-publish all our blog posts at once?
First, I’d try doing the combination of literal redirects plus a wildcard redirect. Webflow might be “smart enough” to prioritize the literals over the wildcards, so your wildcard redirect becomes a catch-all. That said, I really wouldn’t want to have to add manual redirects for each new post, so it’s not ideal.
Another approach, which requires a bit of programming, is to build yourself a script-based redirector.
Something like
/post/(.*) → /post-redir?slug=%1
And then in your redir page, you’d have collection lists to load all of the blog posts and slugs. Your script would then look for the requested slug in the existing posts. If a match is found, redirect them to that post. If no match is found, redirect them to the blog homepage.