views:

83

answers:

1

I've got a problem with rewriting a URL to a fastcgi dispatcher. If I leave only:

RewriteRule ^(.*)$ dispatch.fcgi/$1 [L,QSA]

I expected L (last rule) to cause only a single rewrite. Instead, it keeps prepending dispatch.fcgi until apache reports an error.

I know it can be fixed with:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L,QSA]

But what is the reason for multiple rewrites? Does L do something else than I think it does?

+1  A: 

Apparently -- and I only read this here, I have no first hand knowledge -- the [L] directive does not work in .htaccess files, only if its in your .conf file.

See: http://stackoverflow.com/questions/286004/hidden-features-of-modrewrite

within the .htaccess context, [L] will not force mod_rewrite to stop. it will continue to trigger internal

Erik
I guess that answers http://stackoverflow.com/questions/1775877/ too - unfortunatley the real answer wasn't marked there...
viraptor