There are some Blog posts out there about Rails and nice URLs for SEO. I don’t know if it really works, but it’s easy to do and nice URLs can never be wrong, can they?
There’s also a plugin called acts_as_sluggable which does exactly that, so that you can do things like
class BlogPost
acts_as_sluggable :with => :title
end
And get URIS like
http://www.example.com/blogposts/3-my-cat-ate-my-flowers
There are some problems with act_as_slugable and Rails 1.2, though. Acts_as_sluggable comes with some ActiveRecord monkey patching for the find_from_ids method. As mentioned by Obie Fernandez this isn’t necessary for Rails 1.2 because Rails all the to_i-stuff itself. So if you want to use the plugin with Rails 1.2 just comment out the active_records_overrides.rb contents and you should be fine.
Related Posts
- Moving from Wordpress on a VPS to Jekyll and Amazon S3 - How and why to move your blog from Wordpress to a static webpage that is hosted on Amazon S3 using the new website hosting feature
- Running an Ioke web application on Google App Engine using Ikanserve - A small howto on how to run an Ioke web application on the Google App Engine
- Predictably Irrational - Humans are more irrational than you thought. The book 'Predictably Irrational' by Dan Ariely gives great insight into human behaviour.