fix up the redirect url