Move and redirect your article to another site
PLEASE NOTE! The following snippet is user submitted. Use at your own risk!
Often you have an article on site A but you want to move it to site B.
The best way to make sure that people, their bookmarks etc are moving smoothly along is by sending a 301 header.
Assume we want to move node/314 to a new location: http://newsite.com/node/567, then all we need is this simple snippet in the original page.
<?php
if ($_GET['q'] == 'node/314') {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http[antiurlfilter]://newsite.com/node/567");
exit();
}
?>But remove the [antiurlfilter]: That is a silly hack to make sure the snippet shows up right on Drupal.org.
Note that there is now also a module, Patch Redirect, which will let you do this through the admin interface rather than using PHP.
