HDRI image mapping

How do I map an HDRI image so thet it only affects the objects and doesn’t show up in the background (eg. it gets reflected in a mirror but doesn’t show behind the mirror)?

I am bumping this for you. This is a good question, I hope somebody has an answer.

Why use HDRI when you can use a sphere mapped with a background image?

What I do is render to a transparent PNG.
That is, with the rgbA settings.
When I open them in PS I don’t see the background.
In Blender I think the HDRI background won’t show up on the render if you put a plane in the background.
Don’t know for certain though, but I do think so.
P

Can you map a lightprobe image that easily to a sphere?

Vliegtuig, will a transparent png reflect off surfaces?