title: mod_rewrite: how to redirect everything except 2 files to "/"?
body: <p>I have a bit of a problem with a mod_rewrite configuration.</p>
  
  <p>I want to redirect everything to the root directory (<a href="http://www.mydomain.com/" rel="nofollow">http://www.mydomain.com/</a>), except for two files.</p>
  
  <p>So I tried this:</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !^/
  RewriteCond %{REQUEST_FILENAME} !/file1.html
  RewriteCond %{REQUEST_FILENAME} !/file2.html
  RewriteRule ^(.*)$ http://www.mydomain.com/ [L,R=301]
  </code></pre>
  
  <p>This unfortunetely doesn't redirect anything.</p>
  
  <p>If I leave out the first RewriteCond line, I get a redirection error.</p>
  
  <p>Where did I go wrong here?</p>