Forum: Ruby on Rails redirect_to response code?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
043efdc2a79afbfec84696f50fd42163?d=identicon&s=25 Onur Turgay (Guest)
on 2006-02-02 10:29
(Received via mailing list)
hi,
I wanted to make some redirects from my old page urls to my new ones.
In order to make google see the pages have moved permanently, I have
to send a 301 moved permanently code to google. when I use redirect_to
it sends a 302 moved temp. code. Can I change this behaviour?
Thanks in advance.
3ccecc71b9fb0a3d7f00a0bef6f0a63a?d=identicon&s=25 Kent Sibilev (Guest)
on 2006-02-02 18:43
(Received via mailing list)
Before you do redirect_to set 'Status' header like so

@headers["Status"] = "301 Moved Permanently"

Kent.
This topic is locked and can not be replied to.