I was not familiar with that Variant Rule, so here is the text:
DMG p24 wrote:VARIANT: STRIKING THE COVER INSTEAD OF A MISSED TARGET
In ranged combat against a target that has cover, it may be important to know whether the cover was actually struck by an incoming attack that misses the intended target. First, determine if the attack roll would have hit the protected target without the cover. If the attack roll falls within a range low enough to miss the target with cover but high enough to strike the target if there had been no cover, the object used for cover was struck. If a creature is providing cover for another character and the attack roll exceeds the AC of the covering creature, the covering creature takes the damage intended for the target.
If the covering creature has a Dexterity bonus to AC or a dodge bonus, and this bonus keeps the covering creature from being hit, then the original target is hit instead. The covering creature has dodged out of the way and didn’t provide cover after all. A covering creature can choose not to apply his Dexterity bonus to AC and/or his dodge bonus, if his intent is to try to take the damage in order to keep the covered character from being hit
If we use that Variant Rules, does it means we ignore the Regular rules for Firing Into Melee
which gives a -4 penalty to attack because
you are actively trying to avoid hitting an Ally?
PRD wrote:Shooting or Throwing into a Melee: If you shoot or throw a ranged weapon at a target engaged in melee with a friendly character, you take a –4 penalty on your attack roll. Two characters are engaged in melee if they are enemies of each other and either threatens the other. (An unconscious or otherwise immobilized character is not considered engaged unless he is actually being attacked.)
Note that the Variant rule is not based on the -4 penalty of firing into melee, but the penalty from the COVER
(which could be the same, worst or better...)