title: htaccess should redirect from non-www to www, from http to https, and internaly use content from www subfolder. But still returns error 500
body: <p>my htaccess should solve these tasks:</p>
  
  <ol>
  <li>redirect all url from http to https</li>
  <li>redirect all url from non-www to www domain name</li>
  <li>internaly load all content from www folder (without redirection)</li>
  </ol>
  
  <p>here is my htaccess file</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{HTTPS} !on
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
  
  RewriteCond %{HTTP_HOST} ^mysite\.cz$
  RewriteRule (.*) https://www.mysite.cz/$1 [R=301, L]
  
  RewriteCond %{HTTP_HOST} ^(www\.)?mysite\.cz$
  RewriteRule ^$ www/
  RewriteCond %{HTTP_HOST} ^(www\.)?mysite\.cz$
  RewriteRule (.*) www/$1
  </code></pre>
  
  <p>but this returns error 500, thank you for your help.</p>