Scope: Move an old document to a new URL with HTTP 301 Permanent Redirect.
Module used (required if you don’t want to modify an existing page): URL aliases.
- Create a new page (or edit an old one). Select “PHP code” in input type.
- Fill the url alias box, with the old document path
- Insert the following code: <?php
// Permanent redirection
header(“HTTP/1.1 301 Moved Permanently”);
header(“Location: http://www.yoursite.tld/location”);
exit();
?> - Save.
Note: Obviously you can’t see the page (you’ll be redirected to specified address), but you can edit or delete the page from admin/content/node. As admin, if you try to unpublish the page you’ll be redirected anyway: you have to delete the page to fix it.
See also: http://www.somacon.com/p145.php
Today I discovered a module who promised to do the same:
http://drupal.org/project/path_redirect