Return to Snippet

Revision: 2803
at April 16, 2007 21:50 by jonhenshaw


Initial Code
def old_action
headers["Status"] = "301 Moved Permanently"
redirect_to "http://www.domain.com/"
end

Initial URL


Initial Description
This redirects visitors to a new URL using a 301 redirect. Using a 301 redirect is the safest way to let search engines like Google, Yahoo!, Live and Ask know your address has changed.

Initial Title
Ruby on Rails 301 Redirect

Initial Tags
redirect, rails, ruby

Initial Language
Rails