Only redirect if the responded http code is 3xx. TODO: make sure the protocal is the same.