The Response.Redirect
is passing the url from qualification, and they correct the url if its not in the form of http://server/path
You can ether disable this qualification using the useFullyQualifiedRedirectUrl
property, ether make a custom redirect.
So ether UseFullyQualifiedRedirectUrl=false
, as MSDN says, ether just use this function for redirect:
public static void CustomRedirect(string url, bool endResponse)
{
HttpResponse cResponce = HttpContext.Current.Response;
cResponce.Clear();
cResponce.TrySkipIisCustomErrors = true;
cResponce.StatusCode = 302;
cResponce.Status = "302 Temporarily Moved";
cResponce.RedirectLocation = url;
cResponce.Write("<html><head><title>Object moved</title></head><body>\r\n");
cResponce.Write("<h2>Object moved to <a href=\"" + url + "\">here</a>.</h2>\r\n");
cResponce.Write("</body></html>\r\n");
if (endResponse){
cResponce.End();
}
}
This function is a cut off version of the Redirect function of asp.net