Reinforce desired behavior, ignore everything else.

If you have time, that is. If you smack the dog whenever he tries to bite, that also works.