Issues with php and fastcgi with mod_rewrite

I recently tried installing fastcgi for php on my dreamhost account, and it works correctly, except with my mod_rewrite rules. I need these rules so I can get pretty urls with codeigniter.

I’m getting this error in my http error log:
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.

If I comment out the fastcgi lines, or the rewrite lines, this works properly. I’m having a hard time seeing how this could be recursive, but it obviously is. I’m not sure if the url is rewritten, the handler applied, and then rewritten again? If anyone has any thoughts, it would be a huge help.


The .htaccess file:
Options +ExecCGI

RewriteEngine On RewriteBase /

RewriteCond $1 !^(index.php|public|stats|serve.php|robots.txt) [NC]
RewriteRule ^(.*)$ index.php/$1 [L]

<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php

AddHandler fastcgi-script fcg fcgi fpl
AddHandler php5-fastcgi .php
Action php5-fastcgi /php5-wrapper.fcgi

Well you can then try the “obvious” of moving the wrapper script to a subdirectory or adding an exclusion for it on the rewrite condition.

:cool: -//-

Yeah, that did the trick and obviously wasn’t so obvious to me :).

Anyways, it lookslike adding the following did the trick.
RewriteCond $1 !^php5-wrapper.fcgi [NC]