You need the sun to shine through thinning mist, projecting your shadow onto thicker mist, with the thinner mist splitting the sunlight into a rainbow, framing your shadow. It is most frequently seen on a mountain ridge, with cloud on one side, and the sun shining through thin mist on the other. I've witnessed it about half a dozen times, some more spectacular than others. On flat land there is little chance of seeing one, due to the angle of the sun.
Cheers,
TE.