1. 程式人生 > >學習筆記18_防盜鏈操作

學習筆記18_防盜鏈操作

超鏈接 防盜 stand 學習筆記 end one ntc global 盜鏈

*盜鏈:就是別人使用自己的網站的url作為超鏈接

在Global.asax中,

protect void Application_BeginRequest()

{

   if(Request.UrlRefer==null||UrlCompare( Request.UrlRefer, Request.Url, UriComponents.HostAndPort, UriFormat.StateUnescaped,StringComparison.CurrentCultureIgnoreCase ))

  {

    Respone.End();

  }

}

學習筆記18_防盜鏈操作