{"id":88,"date":"2008-03-12T20:25:36","date_gmt":"2008-03-13T03:25:36","guid":{"rendered":"http:\/\/www.thewysz.com\/wyszdom\/2008\/03\/hey-nerd\/"},"modified":"2008-03-12T20:25:36","modified_gmt":"2008-03-13T03:25:36","slug":"hey-nerd","status":"publish","type":"post","link":"https:\/\/wysz.com\/wyszdom\/2008\/03\/hey-nerd\/","title":{"rendered":"Hey, nerd!"},"content":{"rendered":"<p>I want to do what I assume is a relatively simple task, but I don&#8217;t know how to do it, because I am not smart enough. Here&#8217;s the deal:<\/p>\n<p>I have copied the files from my old site, homepage.mac.com\/wysz\/, to my new domain, thewysz.com, in the \/hotw\/ subdirectory. HotW is Home of the Wysz, by the way, not Hot W.<\/p>\n<p>I don&#8217;t update the files on the .Mac site, so I want anyone who visits one of those pages to know about TheWysz.com. I took care of this a while ago by just adding a link to my new homepage at the bottom of every page. It took about 30 seconds with TextWrangler. This isn&#8217;t the greatest user experience, because if the visitor wants to view the newer version of the page he or she landed on, he or she would have to know to replace homepage.mac.com\/wysz\/[path\/filename] with thewysz.com\/hotw\/[path\/filename].<\/p>\n<p>What I&#8217;d really like is to get the file path of the page somehow written to the file itself. That way I could add a link directly to the new URL or even do a meta refresh. Unfortunately, due to technical limitations of .Mac, I&#8217;m pretty sure server-side redirection is not possible. I think what I&#8217;d want the action to be is a find\/replace of &lt;head&gt; for the refresh, or &lt;\/body&gt; if I wanted to just add a link at the bottom.<\/p>\n<p>So how can I do it? I have over 2,000 files to process, so it would have to be completely automated and not require me to open the files individually. I&#8217;m on a Mac, and not afraid to type into a Unix terminal window.<\/p>\n<p>Thank you, smart people. And if you, my dear readers, cannot offer a solution, I will be very disappointed in you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I want to do what I assume is a relatively simple task, but I don&#8217;t know how to do it, because I am not smart enough. Here&#8217;s the deal: I have copied the files from my old site, homepage.mac.com\/wysz\/, to my new domain, thewysz.com, in the \/hotw\/ subdirectory. HotW is Home of the Wysz, by &hellip; <a href=\"https:\/\/wysz.com\/wyszdom\/2008\/03\/hey-nerd\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Hey, nerd!<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-geek"],"_links":{"self":[{"href":"https:\/\/wysz.com\/wyszdom\/wp-json\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wysz.com\/wyszdom\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wysz.com\/wyszdom\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wysz.com\/wyszdom\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/wysz.com\/wyszdom\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":0,"href":"https:\/\/wysz.com\/wyszdom\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"wp:attachment":[{"href":"https:\/\/wysz.com\/wyszdom\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wysz.com\/wyszdom\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wysz.com\/wyszdom\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}