title: Can't get mod_rewrite IfModule to work in .htaccess
body: <p>I'm trying to get my <code>.htaccess</code> file to forward all URLs to a single page with url parameters so that I can handle the page retrievals that way. What I want to happen is this: say the user types in <code>http://mysite.com/users/dan</code> it should forward to the page <code>http://mysite.com/index.php?url=/users/dan</code>.</p>
  
  <p>Similarly, if the user accessed the URL <code>http://mysite.com/random-link</code> it should forward to <code>http://mysite.com/index.php?url=random-link</code></p>
  
  <p>Here is the code I tried in my <code>.htaccess</code> file, but it just keeps throwing a 500 error at me:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteCond % (REQUEST_FILENAME) !-f
  RewriteRule (.*)$ index.php?url=$1 &lt;QSA,L&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p><strong>I UPDATED MY CODE TO THIS AND IT STILL THROWS A 500 ERROR</strong>
  I changed the &lt; and > to [ and ] and I removed the space after the % in the RewriteCond, but it still throws an error.</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule (.*)$ index.php?url=$1 [QSA,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I'm a novice when it comes to <code>.htaccess</code>, so any help would be greatly appreciated, because I don't know what's causing the server to timeout.</p>