{"id":1543,"date":"2009-01-06T16:38:57","date_gmt":"2009-01-06T21:38:57","guid":{"rendered":"http:\/\/blogs.terrorware.com\/geoff\/?p=1543"},"modified":"2009-01-06T16:38:57","modified_gmt":"2009-01-06T21:38:57","slug":"drupal-and-content-purgatory","status":"publish","type":"post","link":"http:\/\/blogs.terrorware.com\/geoff\/2009\/01\/06\/drupal-and-content-purgatory\/","title":{"rendered":"Drupal and content purgatory"},"content":{"rendered":"<p>Let&#8217;s jut say you&#8217;re migrating content from a static site to a Drupal-based site.\u00c2\u00a0 Let&#8217;s say that you don&#8217;t want to migrate the content all at once and want to roll out the new Drupal-based site ASAP and migrate content as you&#8217;re able to.\u00c2\u00a0 One thing that you could do is to make your old site static.mysite.com and your new Drupal-based site mysite.com.\u00c2\u00a0 Then use the <a href=\"http:\/\/drupal.org\/project\/customerror\">Custom Error module<\/a> and this snippet to automatically redirect to content on the old static site.\u00c2\u00a0 If the content isn&#8217;t in either place, they&#8217;ll get a 404 from the webserver of the static site.<\/p>\n<pre>&lt;?php\r\n\r\n$static_content_host = 'static.mysite.com';\r\n\r\n$destination = isset($_REQUEST['destination']) ? $_REQUEST['destination'] : '';\r\nheader('Location: http:\/\/' . $static_content_host . '\/' . $destination);\r\n\r\n?&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s jut say you&#8217;re migrating content from a static site to a Drupal-based site.\u00c2\u00a0 Let&#8217;s say that you don&#8217;t want to migrate the content all at once and want to roll out the new Drupal-based site ASAP and migrate content as you&#8217;re able to.\u00c2\u00a0 One thing that you could do is to make your old&hellip; <a class=\"more-link\" href=\"http:\/\/blogs.terrorware.com\/geoff\/2009\/01\/06\/drupal-and-content-purgatory\/\">Continue reading <span class=\"screen-reader-text\">Drupal and content purgatory<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_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":[27],"tags":[263,673,671,63,674,648,672],"class_list":["post-1543","post","type-post","status-publish","format-standard","hentry","category-hacks","tag-drupal","tag-error","tag-hack","tag-php","tag-redirect","tag-reference","tag-snippet","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4wnIz-oT","_links":{"self":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/1543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/comments?post=1543"}],"version-history":[{"count":1,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/1543\/revisions"}],"predecessor-version":[{"id":1544,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/1543\/revisions\/1544"}],"wp:attachment":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/media?parent=1543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/categories?post=1543"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/tags?post=1543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}