打印本文 打印本文 关闭窗口 关闭窗口
动易后台登录出现“对不起,为了系统安全,不允许从外部链接地址访问本系统的后台管理页面。”
作者:武汉SEO闵涛  文章来源:本站原创  点击数5807  更新时间:2010/5/1 15:19:53  文章录入:mintao  责任编辑:mintao

动易后台登录出现“

对不起,为了系统安全,不允许从外部链接地址访问本系统的后台管理页面。

修改Admin_CommonCode.asp中如下代码:

Sub CheckComeUrl()
    Dim ComeUrl, TrueSiteUrl, cUrl
    ComeUrl = Trim(Request.ServerVariables("HTTP_REFERER"))
    TrueSiteUrl = Trim(Request.ServerVariables("HTTP_HOST"))
    If ComeUrl = "" Then
        Response.Write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许直接输入地址访问本系统的后台管理页面。</font></p>"
        Call WriteEntry(1, "", "直接地址输入访问后台")
        Response.End
    Else
        cUrl = Trim("http://" & TrueSiteUrl) & ScriptName
  
        If LCase(Left(ComeUrl, InStrRev(ComeUrl, "/"))) <> LCase(Left(cUrl, InStrRev(cUrl, "/"))) Then
            Response.Write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许从外部链接地址访问本系统的后台管理页面。</font></p>"
            Call WriteEntry(1, "", "外部链接访问后台")
            Response.End
        End If
    End If

修改为:

Sub CheckComeUrl()
    Dim ComeUrl, TrueSiteUrl, cUrl
    ComeUrl = Trim(Request.ServerVariables("HTTP_REFERER"))
    TrueSiteUrl = Trim(Request.ServerVariables("HTTP_HOST"))
    If ComeUrl = "" Then
        Response.Write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许直接输入地址访问本系统的后台管理页面。</font></p>"
        Call WriteEntry(1, "", "直接地址输入访问后台")
        Response.End
    Else
  TrueSiteUrl = Left(TrueSiteUrl, InStrRev(TrueSiteUrl, ":")-1)
  
  
        cUrl = Trim("http://" & TrueSiteUrl) & ScriptName
  
        If LCase(Left(ComeUrl, InStrRev(ComeUrl, "/"))) <> LCase(Left(cUrl, InStrRev(cUrl, "/"))) Then
            Response.Write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许从外部链接地址访问本系统的后台管理页面。</font></p>"
            Call WriteEntry(1, "", "外部链接访问后台")
            Response.End
        End If
    End If
End Sub

红色部分为新增加的代码。

打印本文 打印本文 关闭窗口 关闭窗口