We’re moving our website from Wordpress to Webflow, and need to redirect our old news posts to their new URLs, as well as some other static pages.
The website includes 40 or so static pages, and the rest (200+) is all news/blog posts.
Unfortunately, our news posts are not currently set up in a subdirectory on Wordpress, so their URLs all look like “domain.com/slug-of-the-new-item” rather than “domain.com/news/slug-of-the-news-item”
We’ve imported the news items into a CMS collection on Webflow, and their Webflow slugs are identical to their WP ones, so it should (theoretically) just be a matter of redirecting all pages in the root folder to /news/corresponding-slug, with the exception of the other 40 or so static pages.
Some of these static pages need to be redirected to updated URLs, some won’t change.
My thoughts were:
- Set up redirect rules for all static pages first (fairly straight-forward)
- Set up a redirect for all other pages in the root folder /(.*) to point to news/%1
Two problems with point #2 is that
- it creates a redirect loop (since news/… would forever point to news/news/…), and
- it also would also match some of the static pages that don’t need to be redirected (e.g. domain.com/contact will remain the same on Webflow, but under this rule, would be directed to new/contact)
Is there a better way to go about setting up redirects for our website than the steps I outlined above?
If not, how could I go about using wildcards to set up these redirects on Webflow? Does Webflow also support more complex regex expressions?
I found a similar issue here (Move from WordPress to Webflow without losing SEO or causing 404) but the topic was closed without a solution.