{"id":3719,"date":"2018-06-02T08:55:55","date_gmt":"2018-06-02T08:55:55","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=3719"},"modified":"2024-08-15T08:36:36","modified_gmt":"2024-08-15T08:36:36","slug":"wordpress-301-redirects","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/wordpress-301-redirects\/","title":{"rendered":"WordPress 301 Redirects"},"content":{"rendered":"<p>I am looking to 301 my old blog.davelevy.info site. This would seem to be complicated by the need to transform the permalinks from .\/YYYY\/MM\/DD\/slug into .\/slug. Here are my notes, &#8230;<\/p>\n<p><!--more--><\/p>\n<p>I am using the <code>redirection<\/code>\u00a0plugin and I have set up a rule to redirect from the root i.e. blogs.davelevy.info to davelevy.info\/blog.<\/p>\n<p>I have logged a support message on their support forum. They replied and pointed me at this page,\u00a0<a href=\"https:\/\/redirection.me\/support\/redirect-regular-expressions\/\">on their site called redirect regular expressions<\/a>.<\/p>\n<p>I have inserted the following redirection on the target blog. <code>^\/\\d{4}\/\\d{2}\/\\d{2}\/(.*) \/$1\/<\/code> which translates the old permalink format into the new and shorter one.<\/p>\n<p>I have inserted the following rules on the old blog i.e. http:\/\/blog.davelevy,info.<\/p>\n<p><code>^\/(?!wp-admin)(.*)\u00a0http:\/\/davelevy.info\/$1<\/code><\/p>\n<p>i.e. for everything except wp-admin, pass the URL onto the new site, I also have a rule to pass the top level blog page onto the new blog home page since the blog is no longer the home page for the new site.<\/p>\n<p>Image Credit:\u00a0at flickr CC Banalities 2009 BY<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am looking to 301 my old blog.davelevy.info site. This would seem to be complicated by the need to transform the permalinks from .\/YYYY\/MM\/DD\/slug into .\/slug. Here are my notes, &#8230;<\/p>\n","protected":false},"author":1,"featured_media":3721,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[3,584],"tags":[78,1253,911,28],"class_list":["post-3719","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","category-wordpress-technology","tag-redirect","tag-redirection-plugin","tag-technology","tag-wordpress"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2018\/06\/diversion.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/3719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=3719"}],"version-history":[{"count":2,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/3719\/revisions"}],"predecessor-version":[{"id":11258,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/3719\/revisions\/11258"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/3721"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=3719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=3719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=3719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}