{"id":1713,"date":"2004-09-23T23:45:39","date_gmt":"2004-09-24T03:45:39","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=1713"},"modified":"2004-09-23T23:47:35","modified_gmt":"2004-09-24T03:47:35","slug":"phew-redirects-are-good","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2004\/09\/23\/phew-redirects-are-good\/","title":{"rendered":"Phew, redirects are good!"},"content":{"rendered":"<p>So I think I&#8217;ve got all the old articles appearing at their old urls using .htaccess Redirect rules. This is a modification of a method described in the <a href=\"http:\/\/www.wiki.wordpress.org\/MT-Redirect\">WordPress MT-Redirect<\/a> method.<\/p>\n<p>I had a directory of the old numerically-named MT archives, so I used the following script to create a .htaccess file:<\/p>\n<pre>\r\nfor f in 000*html\r\ndo\r\n v=`basename $f .html`\r\n g=`echo $v | sed 's\/^00*\/\/;'`\r\n echo 'Redirect Permanent' \/blog\/archives\/$f 'http:\/\/scruss.com\/blog\/index.php?p='$g\r\ndone\r\n<\/pre>\n<p>which looks like:<\/p>\n<pre>Redirect Permanent \/blog\/archives\/000001.html http:\/\/scruss.com\/blog\/index.php?p=1\r\nRedirect Permanent \/blog\/archives\/000002.html http:\/\/scruss.com\/blog\/index.php?p=2\r\nRedirect Permanent \/blog\/archives\/000003.html http:\/\/scruss.com\/blog\/index.php?p=3\r\n ...\r\nRedirect Permanent \/blog\/archives\/000322.html http:\/\/scruss.com\/blog\/index.php?p=322\r\n<\/pre>\n<p>I put this .htaccess file in the root (top level) directory of my domain, and it all works! Everything I set out to do when <a href=\"http:\/\/scruss.com\/blog\/index.php?p=1701\">reindexing my old MT entries<\/a> has been completed&nbsp;&mdash; see, lookit: <a href=\"http:\/\/scruss.com\/blog\/archives\/000214.html\">http:\/\/scruss.com\/blog\/archives\/000214.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I think I&#8217;ve got all the old articles appearing at their old urls using .htaccess Redirect rules. This is a modification of a method described in the WordPress MT-Redirect method. I had a directory of the old numerically-named MT archives, so I used the following script to create a .htaccess file: for f in [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[163,1816,49],"class_list":["post-1713","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-movable-type","tag-redirect","tag-wordpress"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-rD","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/1713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=1713"}],"version-history":[{"count":0,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/1713\/revisions"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=1713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=1713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=1713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}