Hi I am attempting to code a mod rewrite that redirects /example to /example.php . The code appears like it ought to be working but it is not :

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([a-z]+)/$ /$1.php

error log file :

  [Mon Nov 21 04:13:27 2011] [error] [client 109.149.215.195] 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.
  [Mon Nov 21 04:13:31 2011] [error] [client 109.149.215.195] 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.
  [Mon Nov 21 08:26:23 2011] [error] [client 109.149.215.195] Negotiation: discovered file(s) matching request: /var/chroot/home/content/86/8128686/html/college (None could be negotiated).

  [Wed Nov 23 16:33:55 2011] [alert] [client 109.149.215.195] /var/chroot/home/content/86/8128686/html/.htaccess: RewriteLog not allowed here

  [Wed Nov 23 16:43:23 2011] [error] [client 109.149.215.195] File does not exist: /var/chroot/home/content/86/8128686/html/missing.html
  [Wed Nov 23 16:43:39 2011] [error] [client 109.149.215.195] Negotiation: discovered file(s) matching request: /var/chroot/home/content/86/8128686/html/index (None could be negotiated).
  [Wed Nov 23 16:43:39 2011] [error] [client 109.149.215.195] File does not exist: /var/chroot/home/content/86/8128686/html/missing.html
  [Thu Nov 24 02:46:47 2011] [error] [client 69.58.178.58] Directory index forbidden by Options directive: /var/chroot/home/content/86/8128686/html/uploads/
  [Thu Nov 24 02:46:47 2011] [error] [client 69.58.178.58] File does not exist: /var/chroot/home/content/86/8128686/html/missing.html

thanks ahead of time

First, here's my advice:

Please use the RewriteLog directive: it allows you to find such problems:

# Trace:
# (!) file gets big quickly, remove in prod environments:
RewriteLog "/web/logs/mywebsite.rewrite.log"
RewriteLogLevel 9
RewriteEngine On

Then your solution:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([a-z]+)$ /$1.php [QSA,L]

Let me know whether it works.