Rails 301

This is how we issue 301 in Rails


These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • blinkbits
  • BlinkList

3 Comments »

  1. PJ Hyett said,

    May 28, 2007 @ 8:21 pm

    you can do

    head :moved_permanently, :location => ‘http://www.newdomain.com’

  2. admin said,

    May 28, 2007 @ 8:23 pm

    Much better, thank you

  3. Matt Scilipoti said,

    November 15, 2007 @ 10:58 pm

    Another method, as of [7820] on 2007/10/09

    # Examples:
    # redirect_to post_url(@post), :status=>:found
    # redirect_to :action=>’atom’, :status=>:moved_permanently
    # redirect_to post_url(@post), :status=>301
    # redirect_to :action=>’atom’, :status=>302

    http://dev.rubyonrails.org/changeset/7820

RSS feed for comments on this post · TrackBack URI

Leave a Comment