Monday, 9 September 2013

Is there a (plugin/gem free) way to redirect routes without a subdomain to www. with Rails 3.2?

Is there a (plugin/gem free) way to redirect routes without a subdomain to
www. with Rails 3.2?

I would like to redirect all routes without a subdomain (e.g.
http://foo.com/) to www (http://www.foo.com/). I'd like to maintain all
parameters in the redirect, if possible.
Something in routes.rb with a subdomain constraint perhaps?

No comments:

Post a Comment