title: How to conditionally force SSL depending on domain name?
body: <p>I have two domain names for my Rails app:  app.example.com, short.net.  The longer domain is the standard domain and requires HTTPS, the shorter domain is a convenience domain for providing short URLs and requires HTTP.</p>
  
  <p>Currently I am forcing SSL:</p>
  
  <pre><code>config.force_ssl = true
  </code></pre>
  
  <p>But I really only want to force SSL for the longer domain name.  How can I conditionally force SSL depending on domain name?  The short domain name will redirect to the main domain name and then be forced to use SSL.  This would avoid requiring a SSL certificate for the short domain name.</p>
  
  <p>Thoughts?</p>