title: mod_rewrite/htaccess redirect issue! (recursion limit)
body: <p>I'm trying to create my mod_rewrite file so that basically all of the .php extensions are removed when you view a file.</p>
  
  <p>Here's my .htaccess:</p>
  
  <pre><code>RewriteEngine On
  DirectoryIndex index.php
  ErrorDocument 404 /errors/404.php
  ErrorDocument 403 /errors/403.php
  ErrorDocument 500 /errors/500.php
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule (.*) $1.php [L]
  </code></pre>
  
  <p>Now here's the error i get from my apache log when trying a random name:</p>
  
  <pre><code>[Tue Jan 31 17:26:05 2012] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3112): [client 127.0.0.1] r-&gt;uri = /aboutasdfoi.php.php.php.php.php.php.php.php.php.php
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r-&gt;uri = /aboutasdfoi.php.php.php.php.php.php.php.php.php
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r-&gt;uri = /aboutasdfoi.php.php.php.php.php.php.php.php
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r-&gt;uri = /aboutasdfoi.php.php.php.php.php.php.php
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r-&gt;uri = /aboutasdfoi.php.php.php.php.php.php
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r-&gt;uri = /aboutasdfoi.php.php.php.php.php
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r-&gt;uri = /aboutasdfoi.php.php.php.php
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r-&gt;uri = /aboutasdfoi.php.php.php
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r-&gt;uri = /aboutasdfoi.php.php
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r-&gt;uri = /aboutasdfoi.php
  [Tue Jan 31 17:26:05 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r-&gt;uri = /aboutasdfoi
  </code></pre>
  
  <p>How do i go about fixing it? Thanks</p>