No Gravatar

I made a recent post on 301 redirects in Rails, new to 2.0 we have a few more methods available to us.

1
# prior method<br>headers["Status"] = "301 Moved Permanently"<br>redirect_to "/"<br><br># condo has been defined as a resource in my route.rb<br>redirect_to condo_url(@condo), :status =&gt; 301<br>redirect_to condo_url(@condo), :status=&gt; :moved_permanently<br>

Rails 301 redirects

February 7th, 2008

No Gravatar

301 redirects are one of the best ways to inform search engines that your URLs have changed. They’re simple to implement, so you should have no reason not to use them.

1
headers["Status"] = "301 Moved Permanently"<br>redirect_to "/"<br>

Done.