Both riffle and rifle mean nearly the same thing. Both mean to go through something but there is a subtle difference.
To riffle (rhymes with sniffle) through something means you’re hastily flipping through something or shuffling cards by interlacing them. There’s actually something called a riffle shuffle. I’ve read where riffle is thought to be a combination of ripple and ruffle. Don’t know if that’s true but it makes sense.
Correct: I riffled through my book and found the cash I’d hidden last week.
To rifle through something means you’re searching frantically or ransacking usually with the intent to steal. Rifle actually comes from the Old French word for “steal” or “plunder.”
Correct: Someone rifled through my drawers looking for my hidden jewelry.