{"id":13028,"date":"2011-04-26T11:01:26","date_gmt":"2011-04-26T11:01:26","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/url-forwarding\/"},"modified":"2011-11-20T12:04:03","modified_gmt":"2011-11-20T12:04:03","slug":"url-forwarding","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/url-forwarding\/","author":7319037,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.3","stable_tag":"trunk","tested":"3.2.1","requires":"","requires_php":"","requires_plugins":"","header_name":"Legacy URL Forwarding","header_author":"OllyBenson","header_description":"","assets_banners_color":"","last_updated":"2011-11-20 12:04:03","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/code.olib.co.uk\/redirect","header_author_uri":"http:\/\/code.olib.co.uk","rating":0,"author_block_rating":0,"active_installs":20,"downloads":3555,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[2501,62930,23386,538,62929],"plugin_category":[45],"plugin_contributors":[84215],"plugin_business_model":[],"class_list":["post-13028","plugin","type-plugin","status-closed","hentry","plugin_tags-campaign","plugin_tags-legacy-pages","plugin_tags-redirecting","plugin_tags-url","plugin_tags-url-forwarding","plugin_category-ecommerce","plugin_contributors-ollybenson","plugin_committers-ollybenson"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/url-forwarding.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>For example:<\/p>\n\n<p>http:\/\/www.example.com\/old-page.html<\/p>\n\n<p>Can be directed to:<\/p>\n\n<p>http:\/\/www.example.com\/2011\/04\/25\/new-page.html<\/p>\n\n<p>Simply by adding 'old-page.html' as a custom field when editing new-page within Wordpress.<\/p>\n\n<p>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.<\/p>\n\n<p>Please note that this plugin has no settings\/options pages within the Wordpress admin module.<\/p>\n\n<h3>Things to note<\/h3>\n\n<ul>\n<li>The plugin converts the url it checks to lowercase, so you should enter the meta value as lowercase.<\/li>\n<li>The URL is exactly as stated.  Eg if you have query strings that can variable you would need to treat each one seperately.<\/li>\n<li>There is no reason why you can't have multiple legacy-url meta values associated with a single page. If you have the same meta value associated with multiple pages, the programme will call the first one it finds.<\/li>\n<li>This is a simple solution, and possibly quite inefficient. It uses header redirects so will effectively process one page and then load another.<\/li>\n<li>Because it redirects, search engines will not store the campaign\/legacy URL but the page it is redirected to. The more sensible ones (eg Google) will note the redirected page and update their internal databases.<\/li>\n<li>You can change the name of the custom field that the plugin searches by amending the function itself.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install and enable the plugin,<\/li>\n<li>Add a custom field in the post or page with the name <em>legacy-url<\/em> and the value as the URL excluding the domain name. So if the old page is <em>http:\/\/www.example.com\/this-is-an-old-page.html<\/em>, the value of the custom field should be <em>this-is-an-old-page.html<\/em>.<\/li>\n<\/ol>\n\n<p>Please note, there is no longer a requirement to manually amend the 404 page. If you have done so, you should remove the <em>doUrlForwarding();<\/em> line from the 404 page.<\/p>\n\n<!--section=changelog-->\n<h4>1.3<\/h4>\n\n<ul>\n<li>Updated to make use of meta_query functionality<\/li>\n<li>Revised method of getting url to check against, removing need for str_replace functionality.<\/li>\n<li>Cleared unnecessary cnstant definition, brackets and spaces<\/li>\n<li>Added additional commenting to help amend plugin.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Makes use of Wordpress's built-in redirect functionality.<\/li>\n<li>Uses a hook to add the plugin to the 404 page, so no longer a requirement to amend the 404 page manually.<\/li>\n<li>No longer makes distinct queries to check for posts and pages, instead searches for 'any' page type.<\/li>\n<\/ul>","raw_excerpt":"Redirect\/forward urls to a particular page or post within Wordpress (eg a legacy URL)","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/13028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=13028"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ollybenson"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=13028"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=13028"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=13028"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=13028"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=13028"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=13028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}