title: Create htaccess file for domain redirection (Django app deployed in Heroku)
body: <p><strong>Situation</strong>:</p>
  <p>I've bought a specific domain, let's say <code>'example.ch'</code> for my Django application which is deployed in Heroku. I also created an automated SSL certificate on Heroku (ACM). This certificate is valid for the WWW-subdomain, i.e. ACM Status says 'OK'. It fails for the non-WWW root domain, so I deleted the root domain entry on Heroku.</p>
  <p><strong>Issue</strong>:</p>
  <ul>
  <li>When I type <code>'https://www.example.ch'</code> in the browser, I find my secure webpage and everything is fine.</li>
  <li>When I type <code>'www.example.ch'</code> in the browser, I find my webpage but it is <em>not</em> secure</li>
  <li>When I type <code>'example.ch'</code> in the browser, the webpage cannot be found.</li>
  </ul>
  <p><strong>Goal</strong>:
  I would like to type <code>'www.example.ch'</code> as well as <code>'example.ch'</code> in the browser to be always redirected to <code>'https://www.example.ch'</code>.</p>
  <p><strong>Approach (so far)</strong>:</p>
  <p>My Host (swizzonic.ch) does not allow for 'Alias' records. 'A' records are possible but not supported by Heroku (<a href="https://help.heroku.com/NH44MODG/my-root-domain-isn-t-working-what-s-wrong" rel="nofollow noreferrer">https://help.heroku.com/NH44MODG/my-root-domain-isn-t-working-what-s-wrong</a>). Swizzonic support told me to use a htaccess-file for redirection.</p>
  <p>As I understand so far, I have to extend my middleware accordingly (?). Note that I use the common options for SSL redirection (<code>SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https'), SECURE_SSL_REDIRECT = True, SESSION_COOKIE_SECURE = True, CSRF_COOKIE_SECURE = True</code>).</p>
  <p>How can I create a htaccess-file, where do I have to store it and how does the content look like?</p>
  <p>Many thanks in advance!</p>