{"id":1391,"date":"2003-03-28T15:55:25","date_gmt":"2003-03-28T20:55:25","guid":{"rendered":"https:\/\/www.quirkspace.com\/quirkblog\/?p=136"},"modified":"2003-03-28T15:55:25","modified_gmt":"2003-03-28T20:55:25","slug":"handy-php-script","status":"publish","type":"post","link":"https:\/\/www.quirkspace.com\/quirkblog\/?p=1391","title":{"rendered":"Handy PHP script"},"content":{"rendered":"<p>Using PHP and a custom 404 page to forward site visitors to a new server:<\/p>\n<p><code><br \/>\n&lt;html lang=\"en\"&gt;<br \/>\n&lt;head&gt;<br \/>\n\t&lt;title&gt;All sites have been forwarded&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\nThe new address for the page you requested is:&lt;br&gt;<br \/>\n&lt;a href=\"http:\/\/new.server.address&lt;? echo $REQUEST_URI; ?&gt;\"&gt;<br \/>\nhttp:\/\/new.server.address&lt;? echo $REQUEST_URI; ?&gt;&lt;\/a&gt;&lt;br&gt;<br \/>\nPlease update your bookmarks.<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n<\/code><br \/>\n<!--more--><br \/>\nI couldn&#8217;t find a good example of this anywhere else on line, so here it is.  It&#8217;s stupidly simple in retrospect but it took me most of the afternoon to figure it out.  I hope someone out there finds it useful&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using PHP and a custom 404 page to forward site visitors to a new server: &lt;html lang=&#8221;en&#8221;&gt; &lt;head&gt; &lt;title&gt;All sites have been forwarded&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; The new address for the page you requested is:&lt;br&gt; &lt;a href=&#8221;http:\/\/new.server.address&lt;? echo $REQUEST_URI; ?&gt;&#8221;&gt; http:\/\/new.server.address&lt;? &hellip; <a href=\"https:\/\/www.quirkspace.com\/quirkblog\/?p=1391\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[26],"class_list":["post-1391","post","type-post","status-publish","format-standard","hentry","tag-technical-notes"],"_links":{"self":[{"href":"https:\/\/www.quirkspace.com\/quirkblog\/index.php?rest_route=\/wp\/v2\/posts\/1391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quirkspace.com\/quirkblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quirkspace.com\/quirkblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quirkspace.com\/quirkblog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quirkspace.com\/quirkblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1391"}],"version-history":[{"count":0,"href":"https:\/\/www.quirkspace.com\/quirkblog\/index.php?rest_route=\/wp\/v2\/posts\/1391\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.quirkspace.com\/quirkblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quirkspace.com\/quirkblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quirkspace.com\/quirkblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}