title: url rewriting to redirect www to non www on https
body: <p>I just changed my website http to https. I'll already redirected http to https version. I also want to redirect www version to non www. 
  So far couldn't succeed it.</p>
  
  <p><a href="http://www.domain.com" rel="nofollow">http://www.domain.com</a> => <a href="https://domain.com" rel="nofollow">https://domain.com</a></p>
  
  <p><a href="https://www.domain.com" rel="nofollow">https://www.domain.com</a> => <a href="https://domain.com" rel="nofollow">https://domain.com</a></p>
  
  <p>Here is the .htaccess file;</p>
  
  <pre><code>&lt;ifModule mod_rewrite.c&gt;
      RewriteEngine On
          redirect 301 /makale /sozluk
          RewriteCond %{REQUEST_FILENAME} !-s
          RewriteRule ^(.*)\.[\d]+\.(css|js)$ $1.$2 [L]
  
          RewriteCond %{HTTPS ^www.sporapp.com$ [NC]
          RewriteRule ^(.*)$ https://sporapp.com/$1 [R=301,L]
  
          RewriteCond %{HTTPS} !=on
          # This checks to make sure the connection is not already HTTPS
          RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
  
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^(.*)$ index.php/$1 [NC,QSA,L]
  &lt;/ifModule&gt;
  </code></pre>
  
  <p>Thank you.</p>