What I did to stop my bunny from biting me is scream even if it didn't hurt. Not an angry scream but a hurt scream. In bunny language, this means extreme pain. For my bunny, he would nip me as a sign of affection, but when he realized it hurt me, he stopped.
Bunnies aren't inherently aggressive...