24号24秒

导航

 

  if (context.Request.ServerVariables["HTTP_REFERER"] == null)

            {
                context.Response.Write("NO");
            }
如果直接通过地址栏访问的话,context.Request.ServerVariables["HTTP_REFERER"]为null,如果是ajax发送的get链接,context.Request.ServerVariables["HTTP_REFERER"]为访问链接
 
 
值得纪念的一次探索!
posted on 2017-11-27 18:13  24号24秒  阅读(324)  评论(0编辑  收藏  举报