Community Documentation

Path redirect: send users to pages that moved to a different path

Last updated January 27, 2010. Created by peterx on December 3, 2009.
Edited by LeeHunter, NancyDru, Dave Reid. Log in to edit this page.

Path redirect helps your users find pages that have moved to a different path.

For example, you create http://www.example.com/books/fiction then you rename the page to path http://www.example.com/fiction. You can use Path redirect to redirect books/fiction to fiction.

When you redirect, you redirect to the basic node/403 path. When you use the core Drupal module Path to convert node/403 to the far more meaningful fiction, you are supposed to use Path redirect to redirect to node/403 then let path redirect work out the path is named fiction. For a given page, node/403 will stay constant while the Path provided text might change. In many cases you want to redirect to the logical name, fiction, not the node id, because it makes better sense in searches. Your usage will vary based on the way you want to present paths to the public for long term use, bookmarking, and searches.

Path redirect has an automated expiry system for deleting old redirects. You create a redirect then give the search engines 8 or 16 weeks to update their databases then the redirect expires and disappears. The redirect last used date is updated on each use which means the expiry time is from the last use, not the time of creation. If someone has an old path in a link on their page and you get a visitor from that page once every 10 weeks, an expiry time of 16 weeks will keep your redirect in action, compared to an expiry time of 8 weeks which will expire just 2 weeks before the next visitor.

Path redirect lets you specify the redirect status as 301, 302, etc. 301 is the default for a permanent change. You need to read about HTTP responses to use some of the other options.

From a performance point of view, the redirect lookup overhead should be constant because it is the retrieval of one row from the database followed by an update to change the date last used.