How to use the Rails 4 router to remove "www" in my domain

89 views Asked by At

Currently my site loads with or without www. in the front of the domain. How can I use the Rails 4 router to redirect all www traffic to just the domain, using just the naked domain.

I was able to find existing solutions for older versions of Rails but they do not work with Rails 4: https://www.bignerdranch.com/blog/redirect-www-subdomain-to-your-apex-domain-using-the-rails-router/

0

There are 0 answers