I have been searching for a way to do this but haven’t found anything
yet.
Can anyone please guide me to a resource or tell me how I would go
about doing a 301 (Moved Permanently) redirect using Rails?
Thanks
Frank
I have been searching for a way to do this but haven’t found anything
yet.
Can anyone please guide me to a resource or tell me how I would go
about doing a 301 (Moved Permanently) redirect using Rails?
Thanks
Frank
Frank,
Give this a try in your controller:
def moved
headers[‘Location’] = ‘http://the_new_location_of_your_page.html’
render :nothing => true, :status => 301
end
On 2/8/06, softwareengineer 99 [email protected] wrote:
–
Cody F.
http://www.codyfauser.com
Hi Cody,
Thanks for your reply.
I believe that will do. I will check.
Thanks
Frank
Cody F. [email protected] wrote: Frank,
Give this a try in your controller:
def moved
headers[‘Location’] = ‘http://the_new_location_of_your_page.html’
render :nothing => true, :status => 301
end
On 2/8/06, softwareengineer 99 wrote:
–
Cody F.
http://www.codyfauser.com
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs