I'm trying to redirect my root domain: http://[sitename].com to https://www.[sitename].com
Backend is rails on heroku with a Hostname Base SSL.
My domain is registered on GoDaddy.
And, here is what I've tried:
In my ApplicationController, I have a before_filter called redirect_to_https. And the contents of that are:
def redirect_to_https puts "In Redirect" redirect_to "https://www.[sitename].com#{request.fullpath}" unless request.ssl? || !Rails.env.production? end
When I browse to the root domain of the website, I do not see the "In redirect" in the logs. So, clearly that redirect is not actually working.
Any ideas?