Redirect after Permalink change – What regex do I use?
You can do this by regex rewriting the legacy URL as a query. You can do that either on the post_id or the postname, in this case I think the postname is probably safer (avoids false matches on some other path that might start with numbers). In custom functions, something like this: add_rewrite_rule( ‘^[0-9]+/(.*)/?’, ‘index.php?&name=$matches[1]’,’top’ … Read more