First thought is that there is a syntax error. Since a RewriteRule REQUIRES both regex and redirection, that's likely your problem (first RewriteRule).
Second, I can't believe that you can comment out the entire .htaccess and you're still getting a 500 error so there may be something else in play other than your .htaccess (somewhere else on the server). I think you should comment out every line (#) then remove, one at a time starting with the php_flag directives first, then RewriteEngine on and the first rule set and, finally, the last RewriteRule. At least that's what I would do.