I want to redirect any request from http://www.foo.com to foo.com. Normally, I’d use mod_rewrite to do this and just use a regular expression to match any subdomains. However, I’m using Heroku to host this app which, from what I can tell, doesn’t give me this ability.
Is there an easy way in Ruby on Rails to do this? Thanks!
You can add a before_filter in your ApplicationController