Wiring bathroom exhaust fan and light

I want to wire a bathroom exhaust fan to come on when the light over the shower is on to exhaust moisture, but also want to be able to operate the fan independently on another switch without the shower light on to exhaust odor. I thought perhaps a 3 way switch for the fan/light combo would work if I wired the common leg to power the single switch for the fan when the 3 way if off (so that single switch would be have no power supply if the 3 way was on), but realized the power from the fan only switch when

on would only be backfed to the light/fan connection illuminating the light again.

more about: Wiring bathroom exhaust fan and light