title: How to use multiple RewriteCond in my htaccess file?
body: <p>I had this contents in my <code>.htaccess</code> file to handle my routing:</p>
  
  <pre><code>DirectoryIndex root.php
  
  RewriteEngine on
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule . root.php [L]
  </code></pre>
  
  <p>Then I wanted to redirect users to my domain with leading "www." with this code I found on SO:</p>
  
  <pre><code>RewriteEngine on
  
  RewriteCond %{HTTP_HOST} !^www\.
  RewriteCond %{HTTPS}s on(s)|offs()
  RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [NE,L,R]
  </code></pre>
  
  <p>So I removed the <code>L</code> flag from this condition and copied that code in there, so that this is my <code>.htaccess</code> file now:</p>
  
  <pre><code>DirectoryIndex root.php
  
  RewriteEngine on
  
  RewriteCond %{HTTP_HOST} !^www\.
  RewriteCond %{HTTPS}s on(s)|offs()
  RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [NE,R]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule . root.php [L]
  </code></pre>
  
  <p>Unfortunately this leads to an Internal Server Error. How can I fix it and make both conditions work?</p>