Correctly strip all types of magic urls