title: Force both WWW and HTTPS in .htaccess
body: <p>I searched stackoverflow but my htaccess file is a little different than what I saw. Here's what I currently have:</p>
  
  <pre><code>Options -Indexes
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
  RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
  RewriteCond %{SERVER_PORT} 80
  RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
  </code></pre>
  
  <p>I've seen a couple of different methods for forcing HTTPS in an htaccess file, and both worked for me on their own, but getting both www + https no matter WHAT someone types into their browser is what I'm after.</p>