lucy24 - 9:45 pm on Jul 10, 2012 (gmt 0)
Edit: Proving once again that I type much slower than g1...
Do you think there is the least possibility that your Apache installation does not include mod_rewrite? There's a thought to make the blood run cold. The "IfModule" envelopes are for boilerplate htaccess that comes with CMS packages whose designer has no idea where they will be used. Once you're on an individual site, you either have a given module or you don't. If it exists but the AllowOverrides settings don't let you use it, change hosts :)
.* should be expressed as
so the server doesn't have to backtrack after capturing the entire request and then learning that it was supposed to leave room for .php at the end. (Apache works only in one dimension. It can't see what's coming up ahead.) Opening anchor so it can't cheat by ignoring any earlier full stops-- not that there should ever be any in mid-URL. Unless, ahem, your name is apache dot org
+ rather than * because if you get a request for www.example.com/.php/ then the slash is the least of your problems.
Does it also attach / to the names of index pages? If so, you need to do some ruthless redirecting, because "index.php" should never occur at all:
RewriteRule ^(([^./]+/)*)index\.php/? http://www.example.com/$1 [R=301,L]