I\'m looking to learn how to cleanup my app\'s URLs. My app is powered by Rails 3 on Heroku.
The desired URL is https://www.example.comite.com
I
DNS records cannot define the protocol for a domain, therefore you can't redirect http:// to https:// through DNS. Doing it through the web server configuration is not portable, hard to do, error prone and just plain outdated. This is a job best handled by the Rails router.
# beginning of routes.rb
match "*path" => redirect("https://www.mysite.com/%{path}"), :constraints => { :protocol => "http://" }
match "*path" => redirect("https://www.mysite.com/%{path}"), :constraints => { :subdomain => "" }