title: .htaccess redirect everything uknown except a few defined ones
body: <p>I want to rewrite <code>/home</code> to the <code>index.php</code> and <code>/edit</code> to <code>edit.php</code>, but everything else, like <code>/asdfg</code> I want to redirect to <code>new.php</code></p>
  
  <p>Both edit and home on their own work, but the <code>(.*)</code> takes priority over those rules, I tried it without the <code>RewriteCond</code>, but then nothing works.</p>
  
  <pre><code>RewriteEngine on
  RewriteBase /
  RewriteRule ^home$ /index.php
  RewriteRule ^edit$ /edit.php
  RewriteCond %{REQUEST_FILENAME} !-f 
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule ^(.*)$ /new.php [L,R=301]
  </code></pre>
  
  <p>I just need all undefined URI's to redirect to <code>/new.php</code></p>
  
  <p>I also need to keep the <code>/asdfg</code> in the URI, so I can grab it with JavaScript and show the appropriate content, an either show a page to let ppl make a new post or to show existing content.</p>
  
  <p>I can't define all existing content, because that comes from a database, only a few predefined, reserved <code>"/folders"</code> will redirect to predefined pages.</p>
  
  <p>I have the following working:</p>
  
  <pre><code>RewriteEngine on
  RewriteRule ^home$ /index.php [R]
  RewriteRule ^edit$ /edit.php [R]
  </code></pre>
  
  <p>It leaves the /home there and go to index.php</p>
  
  <p>Now I just need to redirect all unknown requests to a default page new.php.</p>
  
  <p>I basically want to prevent users getting a 404 or any other error, ever..</p>