上次的文章,留下了一个问题,就是这个ASP的生成地图工具该如何修改了由于自己不会ASP,给了大家一个思路,今天翻阅了网上的资料,自己在反复调试了下终于搞定了,发现ASP代码很变态,写的格式是有区别的,不像PHP任意,只有结束符号就可以了,东西完成了,和大家分享下,如果遇到这个问题,可以用这个试下首先声明,我不是SEO高手,我在探索
dim pro
dim inde '在前面要声明下变量
Function getfilelink(file,datafile)
file=replace(file,root,"")
file=replace(file,"\","/") '我的在这里加在这个后面的
pro="products"
inde="index.html"
if instr(file,inde)>0 then
cccc="1.0"
else
if instr(file,pro)>0 then
cccc="0.9"
else
cccc="0.8"
end if
end if '结束了
file=replace(file,wangmin,"")
If FileExtensionIsBad(file) then Exit Function
if month(datafile)<10 then filedatem="0"
if day(datafile)<10 then filedated="0"
filedate=year(datafile)&"-"&filedatem&month(datafile)&"-"&filedated&day(datafile)
getfilelink = "<url><loc>"&server.htmlencode(session("server")&seoDir&file)&"</loc><lastmod>"&filedate&"</lastmod><changefreq>daily</changefreq><priority>"&cccc&"</priority></url>"
Response.Flush
End Function
查看下我的xml
申请创业报道,分享创业好点子。点击此处,共同探讨创业新机遇!
