For example I have tried:
Floor[Mod[H, p1*p2*p3]/(p1*p2*p3)]/.{Floor[Mod[H, x_]/(x_)]->0}
and
Floor[Mod[H, p1*p2*p3]/(p1*p2*p3)]/.{Floor[Mod[H, x__]/(x__)]->0}
but they not does work except for the case where the product is just p1. The number of elements in these products will vary from p1 to p1*p2*...*pm.