Redirect loop because of RewriteRules

There was a similar problem here. Maybe the steps described there can solve your issue.