[wp-hackers] Changing page permalink structure
Bryan Petty
bryan at ibaku.net
Tue Oct 2 14:43:11 UTC 2012
On Tue, Oct 2, 2012 at 7:53 AM, "Matthias P. Würfl" <mpw at taquiri.de> wrote:
> Why not simply keep track of the changes of the URL? Save the old URL to a
> table and search this before giving a 404. Then send 301 instead of 404.
Actually, I've looked into this more now, and realized that the latest
version of WordPress does actually redirect appropriately to the new
page structure when re-parenting happens. Also, I did already know
that when slugs change, the old one is still saved, and still works
(and redirects appropriately as well).
In fact, as long as the last slug in the URL is the current or an
older slug for a page, it doesn't matter what you specify as the
parent slugs, WordPress will automatically redirect appropriately,
even if those parent page slugs never existed.
So all of this should work perfectly fine already for what Benjamin
Lupu wants to do.
Regards,
Bryan Petty
More information about the wp-hackers
mailing list