I’m trying to redirect my old blog page to new webflow url. Old blog url contains multiple level folder structure.
For eg. /category/sub-category/**blog-slug** → /blog/**blog-slug**
I tried using /category/sub%-category/(.*) → /blog/%1 and /category/(.*)/(.*) → /blog/%2
Final redirect after applying those rules is /blog/sub-category/**blog-slug** instead of /blog/**blog-slug**
Hi Prakash, it looks like you’re trying to treat the redirects table as a rules sequence, but there is no ordering and only one ( or zero ) will match.
You’re describing your URL structure as /category/sub-category/blog-slug, so my guess is that an example might be /coffee/de-caf/nespresso-is-great.
In that case your redirect would probably be;
/(.*)/(.*)/(.*) → /blog/%3
Which might present problems because it would match any 3-level hierarchy. You might be safe if your blog paths are the only ones with this depth.
Thanks, this rule worked /(.*)/(.*)/(.*) → /blog/%3 and the site contains only blogs
And i tried /(.*)/(.*) → /blog/%2 to capture 2 level hierarchy but throw an error
A redirect from /(.)/(.) to /blog/%2 creates a redirect loop.