If you can distinguish which url's need to use rewrite, and which do not, then extend the rewrite to only change the right ones. But I suspect that this is not possible, so you need some other way to identify which use each rule.
Sent from my android device so quoting is crap ... need to kill these painful email clients!