A free hydroxyl group may be replaced by a halo group by first reacting the free hydroxyl group with triflic anhydride, mesyl chloride or tosyl chloride, in the presence of a base like pyridine, to block the hydroxyl with a leaving group such as triflate, mesyl, or tosyl, respectively.