technicalpickles

Open Source ProjectsCode that Might be Useful to You

Talks I've GivenOn Technologies and Ideas

ThoughtsWhere I Sometimes Write Things

Resume If You Still Believe In Those

Follow Me On

GitHubIf coding is your thing

TwitterIf you tweet

TumblrIf you're ADD

Rails Permanent Redirects


I feel silly writing something so short and simple, but horribly outdated information when googling ‘rails permanent redirect’ drove me to it. I’m just hoping the SEO gods smile upon me.

So, my friends, check it:

redirect_to "http://somewhere.com", :status => 301
redirect_to posts_url, :status => :moved_permanently

For the curious, :status “can either be a standard HTTP Status code as an integer, or a symbol representing the downcased, underscored and symbolized description” (source)

comments powered by Disqus