Fix redirect rules by removing matching characters which shouldn't be
there.