title: I want to redirect all http requests to https, and all www requests to non-www
body: <p>Here is my current .htaccess file:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine on
  RewriteCond %{HTTPS} !=on
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /index.php
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I want to redirect all http requests to https, and all www requests to non-www, and all file requests to index.php</p>
  
  <p>For example:</p>
  
  <p><a href="http://www.example.com" rel="nofollow">http://www.example.com</a> to <a href="https://example.com" rel="nofollow">https://example.com</a></p>
  
  <p><a href="https://www.example.com" rel="nofollow">https://www.example.com</a> to <a href="https://example.com" rel="nofollow">https://example.com</a></p>
  
  <p><a href="http://example.com/file.php" rel="nofollow">http://example.com/file.php</a> to <a href="https://example.com/index.php" rel="nofollow">https://example.com/index.php</a></p>
  
  <p>Everything seems to be working except the www part.. Any help please?</p>