Last updated 22 November 2007. Created on 7 February 2006.
Edited by add1sun, pwolanin, Bèr Kessels. Log in to edit this page.

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:, then all we need is this simple snippet in the original page.

if ($_GET['q'] == 'node/314') {
  header("HTTP/1.1 301 Moved Permanently"); 
  header("Location: http[antiurlfilter]://"); 

But remove the [antiurlfilter]: That is a silly hack to make sure the snippet shows up right on

Note that there is now also a module, Patch Redirect, which will let you do this through the admin interface rather than using PHP.

Looking for support? Visit the forums, or join #drupal-support in IRC.