<% aVar = 1 Response.ContentType = "text/plain" Set aConn = Server.CreateObject("ADODB.Connection") aConn.ConnectionString = SEARCHDBCONNECTSTRING aConn.Open() 'seoDomainName = Lcase(Request.ServerVariables("SERVER_NAME")) seoDomainName = stripDomain(Request.ServerVariables("SERVER_NAME")) 'seoDomainName = Replace(seoDomainName,"staging.","") SqlState = "sp_GetDomainInfoByDomainName '" & seoDomainName & "'" 'REsponse.WRite SqlState Set aRS = aConn.Execute(SqlState) Dim isAlias, isInfo, isFeeder isAlias = 0 isInfo = 0 isFeeder = 0 do while (not aRS.EOF) isAlias = aRS("isAlias") isInfo = aRS("isInfo") isFeeder = aRS("isFeeder") aRS.Movenext loop 'Response.Write "Int: " & gintSiteID & vbCRLF 'Response.Write "isAlias: " & isAlias & vbCRLF 'Response.Write "isInfo " & isInfo & vbCRLF 'Response.Write "isFeeder " & isFeeder & vbCRLF Response.Write "User-agent: *" & vbCRLF Response.Write "Disallow: /404.html" & vbCRLF Response.Write "Disallow: /404codes.asp" & vbCRLF Response.Write "Disallow: /contact.asp" & vbCRLF Response.Write "Disallow: /aboutus.asp" & vbCRLF if (isAlias = 1) then Response.Write vbCRLF & "User-agent: Googlebot" & vbCRLF Response.Write "Disallow: /" & vbCRLF Response.Write vbCRLF & "User-agent: slurp" & vbCRLF Response.Write "Disallow: /" & vbCRLF end if aConn.Close() Set aRS = Nothing Set aConn = Nothing Function stripDomain(vstrDomain) Dim intCharIndex, strTemp if (vstrDomain = "" or isNull(vstrDomain) or vstrDomain=null) then stripDomain = "" else vstrDomain = LCase(vstrDomain) 'Set string to lower case for the comparision if left(vstrDomain, 7) = "http://" then vstrDomain = right(vstrDomain, len(vstrDomain) - 7) intCharIndex = InStr(vstrDomain,"/") - 1 if intCharIndex > 0 then vstrDomain = left(vstrDomain, intCharIndex) if left(vstrDomain, 4) = "www." then vstrDomain = right(vstrDomain, len(vstrDomain) - 4) if left(vstrDomain, 8) = "staging." then vstrDomain = right(vstrDomain, len(vstrDomain) - 8) stripDomain = vstrDomain end if End Function %>