handles the case when the scheme mismatch between the tail file and the request

handles the case when the redirect URL is a relative URL