Serendipity asssumes all subdirectories under its directory are Serendipity's.
Erm, OK.
This usually works out fine, because anything else that uses redirection will write its own .htaccess, and Apache uses the one from the closest directory.
Yes, this is fine for redirection because the mod_rewrite directives are not inheretied unless specified. However, all of the other directives in the .htaccess files (including DirectoryIndex) are inherited across subdirectories.
The problem is, not all applications that use redirection set the DirectoryIndex directive. For example, gallery2 does use mod_rewrite, but it does not set DirectoryIndex. So, the "/index.php" value is inherited by the galler2 subdir, screwing things up.
Other people have had the same complaint you mention, though. The easiest solution is to simply create an .htaccess file in each non-Serendipity subdirectory (assuming the subdirectory in questions doesn't already have one of its own) with the following code:
Code:
RewriteEngine Off
That will cause Apache to ignore the top-level Serendipity redirection rules, including the DirectoryIndex.
I saw those posts, and it seems like the problem lies more in s9y's (mis)use of the DirectoryIndex value. I think a better solution is to change the way this value is set, unless there is some functional reason for setting it to the root.