g1smd - 6:16 pm on Feb 27, 2013 (gmt 0)
In msg:4549484 your rules are in the wrong order.
You must list all redirects first and then all rewrites. This is important, otherwise some requests will invoke unwanted multiple step redirection chains.
In the list of redirects the rules must be ordered from most specific to most general.
In the list of rewrites the rules must be ordered from most specific to most general.
You have 6 blocks of code 1 - 2 - 3 - 4 - 5 - 6.
I think they should be ordered: 6 - 2 - 5 - 1 - 4 - 3 and you MUST add a preceding RewriteCond testing THE_REQUEST to every rule that deals with requests for index.php files or you will have an infinite loop.
The non-www/www rule can be improved by using a mosre specific pattern in the condition: !^(www\.example\.com)?$ in place of ^example\.com
#Drops the .php extension
is incorrect. That rule rewrites extensionless requests to find the correct internal php file.
As I said before in several threads in recent days "Mod_rewrite does not make URLs. It responds to URL requests after a link is clicked."
A rewrite is a fully internal process that maps an external URL request to an internal filepath. It is the Apache internal file pointer that is altered or "rewitten" in a rewrite, NOTHING happens to URLs in a rewrite.
The process you want here is to "redirect requests for .php URLs to the new extensionless URL" and to "rewrite incoming extensionless requests to fetch content from the matching php file".
Rewriting does not involve URLs! It involves the internal file pointer. Apache cannot alter the links on your pages.