Hi I’m trying to code a mod rewrite that redirects /example to /example.php . The code looks like it should be working but it’s 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 in advance
First, here’s my advice:
Please try to use the
RewriteLogdirective: it helps you to track down such problems:Then the solution:
Tell me if it works.