Correction of url in case of redirection