http로 요청할 때마다 https를 사용하여 페이지를 리디렉션하고 싶습니다.ASP.NET 1.1에서 HTTP를 https로 리디렉션합니다.
나는이 코드를 사용했습니다 : 페이지의
bool isSecure = false;
isSecure = Request.IsSecureConnection;
if(!isSecure)
{
string redirectUrl = Request.Url.ToString().Replace("http:", "https:");
Response.Redirect(redirectUrl);
}
예는 다음과 같습니다를
요청 페이지: https://google.com/test.aspx?id=12233
는 현재이 가리키는 : http://google.com/test.aspx?id=12233
가 다시 재 지정 동일 : http://google.com/test.aspx?id=12233 및 오류 표시 : Internet Explorer c ANNOT
내가 테스트입니다 사이트는 SSL 내 질문은 HTTPS에 페이지를 리디렉션 할 수 없습니다 is..Should certified..but 현재 사용하지 않는 웹 페이지를 표시하고 오류를