The plugin redirects legacy URLs a previous version of a websites that has since been converted into a Wordpress site. It can also be used for other redirecting, eg having a short URL that directs to a page as part of a campaign.
For example:
http://www.example.com/old-page.html
Can be directed to:
http://www.example.com/2011/04/25/new-page.html
Simply by adding 'old-page.html' as a custom field when editing new-page within Wordpress.
Every time a 404 page is called, the Legacy URL plugin checks the database and if it find a legacy-url value that exactly matches the URL it will redirect to the new page.
Please note that this plugin has no settings/options pages within the Wordpress admin module.
- Install and enable the plugin,
- Add a custom field in the post or page with the name legacy-url and the value as the URL excluding the domain name. So if the old page is http://www.example.com/this-is-an-old-page.html, the value of the custom field should be this-is-an-old-page.html.
Please note, there is no longer a requirement to manually amend the 404 page. If you have done so, you should remove the
doUrlForwarding(); line from the 404 page.