title: Two rewrite rules in .htaccess files prevents me from accessing index file
body: <p>Here is my existing .htaccess file:</p>
  
  <pre><code> RewriteEngine On
  
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteCond {REQUEST_FILENAME} !^images
  
   RewriteRule ^files(.+)$ ../../fileManager/server/php/files/$1 [L]
   RewriteRule ^(.+)$ subpage.php?url=$1 [QSA,L]
  </code></pre>
  
  <p>I'll try to explain this as best as I can without making it overly complicated. Ultimately, it boils down to this:</p>
  
  <p>If a URL contains "/files" immediately after the root URL (ie: <a href="http://www.someurl.com/files/username/myFile.jpg" rel="nofollow">http://www.someurl.com/files/username/myFile.jpg</a>), then it should direct the user to a specific URL (in this instance: ../../fileManager/server/php/files/$1).</p>
  
  <p>With the second rule, if the URL contains anything other than "/files" after the root URL, it directs them to "subpage.php". (ie: <a href="http://www.someurl.com/aboutme" rel="nofollow">http://www.someurl.com/aboutme</a>)</p>
  
  <p>Both of these work perfectly fine. However, with both of these rules in place, I can never get to / or /index.php (the root URL: <a href="http://www.someurl.com" rel="nofollow">http://www.someurl.com</a>). I keep getting redirected to subpage.php.</p>
  
  <p>But wait! There's more!</p>
  
  <p>If I remove the first RewriteRule line:</p>
  
  <pre><code> RewriteRule ^files(.+)$ ../../fileManager/server/php/files/$1 [L]
  </code></pre>
  
  <p>...then the second rewrite rule works as I want it to, in that if I go to / or /index.php, it takes me there, but if I go to any other URL, it directs me to subpage.php.</p>
  
  <p>So what I don't understand is this: why is it that with both RewriteRules in there, I can't get to index.php, but with only the second RewriteRule in there, I can?</p>
  
  <p>Additionally, can anybody give any suggestions on how I can fix this?</p>
  
  <p>Any information would be appreciated! Thanks in advance!</p>