Forum: Ruby on Rails redirect_to response code?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Onur T. (Guest)
on 2006-02-02 11:29
(Received via mailing list)
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.
Kent S. (Guest)
on 2006-02-02 19:43
(Received via mailing list)
Before you do redirect_to set 'Status' header like so

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

This topic is locked and can not be replied to.