Alter that code to have the index redirects first. The currect order produces a double redirect for some requests. You do not want that.
Alter the index redirect code to redirect requests other than index.php and make sure it works for folder and root.
This code should appear at the start of the code and appear only once:
RewriteEngine on
Options +FollowSymLinks
In most cases .* is not the pattern to use here. See previous threads in the Apache forum for what to replace it with. It's been discussed many times.
Your ErrorDocument directive will never produce a 404 status. It will produce a 302 status because you included a domain name. The Apache manual explicitly warns to not do this.
Your non-canonical redirect doesn't redirect www requests with a port number. Use
!^(www\.example\.com)?$
as the pattern. The anchoring makes all the difference.
Make all of the above changes. This might not fix all of your problems but the code you have now is causing a lot of other problems, or will cause new problems when you clear up your original problem.
[edited by: g1smd at 10:45 pm (utc) on Jan 5, 2012]