+ -
当前位置:首页 → 问答吧 → 我不想asp后台被收录,用robots写会不会不安全?

我不想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

%>

作者: ay41fu   发布时间: 2011-08-28

前台页面上没有直接打开后台的连接,蜘蛛也是找不到后台地址的

作者: wangsdong   发布时间: 2011-08-28

不写没有关系,是不会收录你的后台地址,你加到robots中是多余的。除非你在前台加了后台的链接地址

作者: wangsdong   发布时间: 2011-08-28