iOS: Sounds when Headphones Are Plugged in but Silent Otherwise?
Solution 1:
The silent switch on the left of the device allows one to completely mute (orange in picture below) or unmute all sounds when no headphones are plugged in.
However, when headphones are plugged in, third-party app sounds (e.g.: game music/sfx, video sounds, etc.) will still play through the headphones whether the switch is activated or not.
Unfortunately, there is currently no way to achieve the same behavior for system sounds and Apple apps.
Solution 2:
For media sounds, it will use different level when the headphones are plugged in. To do this, you turn down the volume to nothing while an app using media sound is active and your headphone is not plugged in. Plug in your headphone, and you will see that the volume comes back on.
But for notifications and ringtone sounds, it will use same volume regardless of headphones plugged in or not. There are no settings available for differentiating this, I'm afraid.