That's kind of a stupid rule, where if the customer just has to say it's for a rifle then the ammo can be sold, but if they say it's for a pistol it can't. Do they also take the customer's word for it when they say they are 18, or 21, or do they ask for proof?
I don't know anybody who has 9mm rifle. I'd bet money that 99.99% of the ammunition sold in 9mm is for handguns and not rifles.