title: htaccess mod_rewrite - reroute all urls to index except /admin
body: <p>I'm setting up a small set of rewrite rules in an htaccess file, where I want every url to go to a index.php file except for /admin which I want to redirect to admin.php. Not very familiar with mod_rewrite or regexp unfortunately.</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteBase /
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^admin$ admin.php [L]
      RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>This gives me an internal server error (not saying 500). Removing or uncommenting the admin rewrite makes it work.</p>