Back to blog

ASP.NET

Global Asax için SSL Yönlendirmesi

Global Asax için SSL Yönlendirmesi Global Asax SSL Yönlendirmesi | SSL redirecting in global.asax protected void Application_BeginRequest ( Object sender , EventArgs e ) { if ( HttpContext . Current . Request . IsSecureC

Mustafa Yılmaz1 min read
Global Asax için SSL Yönlendirmesi

Global Asax SSL Yönlendirmesi | SSL redirecting in global.asax protected void Application_BeginRequest(Object sender, EventArgs e){
   
if (HttpContext.Current.Request.IsSecureConnection.Equals(false)
 && HttpContext.Current.Request.IsLocal.Equals(false))
   
{
   
Response.Redirect("https://" + Request.ServerVariables["HTTP_HOST"]+   HttpContext.Current.Request.RawUrl);
   
}}
  

Related Articles