We're in the process of migrating all of our content from one site to another site and I'm trying to figure out how to programmatically create a bunch of redirects from the old URL to the new URL on a different domain. What I'm trying to do is similar to what I can manually do via Safe Redirect Manager, but I'm having trouble finding how to do it programmatically from PHP.
I'm aware of the safe_redirect method, but I think that only applies to the current page being viewed - not something that is persisted for a bunch of URLs like Safe Redirect Manager.
Thank youTo clarify - we're not trying to replicate the functionality of Safe Redirect Manager. We intend to keep that running on the old site - we're just looking for your help on how to create an instance of the Safe Redirect Manager's post type for each URL we need to redirect.