fixing redirect code url method