我不想asp后台被收录,用robots写会不会不安全?
时间:2011-08-28
来源:互联网
因为robots是可以直接访问的,那就会被有心人士知道后台地址,然后做点坏事呢?
大家一般都是怎么写的?
大家一般都是怎么写的?
作者: niccc1986 发布时间: 2011-08-28
你说的有道理,那就把后台目录设置撑3894789jasdhuqi129
作者: ay41fu 发布时间: 2011-08-28
我发不了帖子!楼主帮忙给看看代码吧!为什么采集不了完整的HTML,中间断了
<%
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = "big5" '转换原来默认的UTF-8编码转换成GB2312编码,否则直接用XMLHTTP组件调用有中文字符的网页得到的将是乱码
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Function getHTTPPage(url)
on error resume next
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,bm)
set http=nothing
If Err.number<>0 then
Response.Write "<p align='center'><font color='red'><b>内容出错</b></font></p>"
Err.Clear
End If
End Function
bm="big5"
str=getHTTPPage("http://www.2100book.com/files/article/info/97/97866.htm")
'str=replace(str,"charset=big5","charset=gb2312")
response.write str
%>
<%
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = "big5" '转换原来默认的UTF-8编码转换成GB2312编码,否则直接用XMLHTTP组件调用有中文字符的网页得到的将是乱码
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Function getHTTPPage(url)
on error resume next
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,bm)
set http=nothing
If Err.number<>0 then
Response.Write "<p align='center'><font color='red'><b>内容出错</b></font></p>"
Err.Clear
End If
End Function
bm="big5"
str=getHTTPPage("http://www.2100book.com/files/article/info/97/97866.htm")
'str=replace(str,"charset=big5","charset=gb2312")
response.write str
%>
作者: ay41fu 发布时间: 2011-08-28
前台页面上没有直接打开后台的连接,蜘蛛也是找不到后台地址的
作者: wangsdong 发布时间: 2011-08-28
不写没有关系,是不会收录你的后台地址,你加到robots中是多余的。除非你在前台加了后台的链接地址
作者: wangsdong 发布时间: 2011-08-28
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28