<% const sAgilentSite1 = "http://www.chem.agilent.com" 'change to http://www.chem.agilent.com in production site const sAgilentSite2 = "http://chem.agilent.com" const sAgilentSite3 = "http://lifesciences.chem.agilent.com" 'response.write Request.ServerVariables("") & "

" & "

" & "

" & "

" Scriptname=lcase(Request.ServerVariables("Query_String")) httpreferer= lcase(Request.ServerVariables("http_referer")) servername=lcase(Request.ServerVariables("server_name")) call addtoTrackTable if Instr(1,servername,"www.zorbax.com",1)>0 then response.redirect("http://www.chem.agilent.com:8002/scripts/cabu/p2_cas_col.asp?groupid=961") End if pagestart=instr(scriptname,servername) + len(servername) + 1 'This value allows us to separate server from pagelink oldurl=mid(scriptname,pagestart) 'If instr(httpreferer,servername)> 0 then 'fromourserver=True 'else 'fromourserver=False 'end if if ((right(oldurl,3)="gif" or right(oldurl,3)="jpg") and httpreferrer="") then pagegraphic=true else pagegraphic=false end if if right(oldurl,3)="pdf" then pagepdf=true if instr(httpreferer,"filexfer")> 0 then filexferpdf=true else filexferpdf=false end if else pagepdf=false filexferpdf=false end if if instr(oldurl,"_vti_")> 0 then vtilink=true else vtilink=false end if if (pagepdf=true and httpreferer="") then 'These are extra 404 errors for pdf files falsepdf=true else falsepdf=false end if if filexferpdf then falsepdf=true end if 'response.write oldurl & "
" 'response.write fromourserver & "
" if instr(oldurl,"favicon.ico") > 0 then favicon=true else favicon=false end if Set oConn = Server.CreateObject("ADODB.Connection") OpenJet oConn, "Web", "" if (pagegraphic = false and favicon=false and pagepdf=false and vtilink=false) then sSQL="Select NewURL from DefNewLink" _ & " Where oldurl='" & oldurl & "'" on error resume next set lTable = oConn.Execute (sSQL) if err.number>0 then fromfile="e:\newweb\wwwroot\cgi-bin\resetiis.txt" tofile="e:\newweb\wwwroot\cgi-bin\resetiis.stm" Set fs = CreateObject("Scripting.FileSystemObject") on error resume next fs.movefile fromfile, tofile if err.number=0 then on error goto 0 Set fs = Nothing RESPONSE.REDIRECT "/CGI-BIN/RESETIIS.STM" end if Set fs = Nothing end if on error goto 0 if not lTable.eof then Set oConn = Nothing lTable.movefirst response.redirect ltable("newurl") end if if instr(oldurl,"cag/products")> 0 then response.redirect "/scripts/phome.asp" end if if instr(oldurl,"cag/isa/pharm/")> 0 then response.redirect "/Scripts/Icol.asp?iInd=3" end if end if iCrumbKey = 5 'Title = "Error 404" Title = "Notice" bNewPage = TRUE iWidRight = 0 ReadLeftNav rNav, oConn, 0 , Country Set oConn = Nothing if instr(Scriptname,".asp") > 0 and (InStr(LCase(request.servervariables("HTTP_REFERER")), "cagm_ecomtest.asp") < 0) then Set Mailer = Server.CreateObject("CDONTS.NewMail") Mailer.From = "PageNotFoundChem@agilent.com" 'Mailer.To="ACOM-LSCA@satyam.com" 'File information for autogenerated mails from LSCA general site : Bapuji Mailer.To="ACOM-LSCA@satyam.com,acom_lsca@tecnics.com" Mailer.Subject = "404 Error" mailbody="Referer: " & httpreferer & vbCRLF mailbody=mailbody & "Page: " & Scriptname & vbCRLF mailbody=mailbody & Now() Mailer.body=mailbody Mailer.send set mailer=nothing end if %>  
This page isn't available or has been updated. Click here to return to Life Sciences/Chemical Analysis homepage or contact us, if you have any questions. <% sub addtoTrackTable Dim miMatchSite if len(Scriptname) = 0 then exit sub if len(httpreferer) = 0 then exit sub if Scriptname = "404;" + httpreferer then exit sub if instr(Scriptname,"404b.htm") >0 then exit sub if instr(Scriptname,".asf") >0 then exit sub if instr(Scriptname,".css") >0 then exit sub if instr(Scriptname,".gif") >0 then exit sub if instr(Scriptname,".jpeg") >0 then exit sub if instr(Scriptname,".ico") >0 then exit sub if instr(Scriptname,".jpg") >0 then exit sub if instr(Scriptname,".js") >0 then exit sub if instr(Scriptname,".jsp") >0 then exit sub if instr(Scriptname,".pdf") >0 then exit sub if instr(Scriptname,"/script/cabu/") > 0 then exit sub if instr(Scriptname,"/scripts/scripts/") > 0 then exit sub if instr(Scriptname,"/TEMP/") > 0 then exit sub if instr(Scriptname,".zip") >0 then exit sub if (instr(Scriptname,"pds.asp") >0) and instr(Scriptname,"pds.asp?") =0 then exit sub if (instr(Scriptname,"pdslocal.asp") >0) and instr(Scriptname,"pdslocal.asp?") =0 then exit sub if (instr(Scriptname,"cag_filexfer.asp") >0) and instr(Scriptname,"cag_filexfer.asp?") =0 then exit sub if (instr(Scriptname,"cag_feedback.asp") >0) and instr(Scriptname,"cag_feedback.asp?") =0 then exit sub if (instr(Scriptname,"chromatograms.asp") >0) and instr(Scriptname,"chromatograms.asp?") =0 then exit sub miMatchSite = instr(httpreferer, sAgilentSite1) + instr(httpreferer, sAgilentSite2) + instr(httpreferer, sAgilentSite3) if miMatchSite = 0 then exit sub if httpreferer = "http://www.chem.agilent.com" then exit sub if instr(httpreferer,"/\") >0 then exit sub if instr(httpreferer,"/://") >0 then exit sub if instr(httpreferer,"404") >0 then exit sub if instr(httpreferer,".cfm") >0 then exit sub if instr(httpreferer,"google") >0 then exit sub if instr(httpreferer,"icpms") >0 then exit sub if instr(httpreferer,".jsp") >0 then exit sub if instr(httpreferer,"/script/") >0 then exit sub if instr(httpreferer,"/cfusion/") >0 then exit sub if instr(httpreferer,"cag_leavecag.asp") >0 then exit sub if instr(httpreferer,"cag_filexfer.asp?iWHID") >0 then exit sub if instr(httpreferer,"SC_Login.asp") >0 then exit sub if instr(httpreferer,"/scripts//") >0 then exit sub if instr(httpreferer,"/scripts/scripts/") >0 then exit sub if instr(httpreferer,"chem.agilent.com:") >0 then exit sub if instr(httpreferer,"http://www.chem.agilent.com/ecommerce/") >0 then exit sub if (instr(httpreferer,"generic.asp") >0) and instr(httpreferer,"generic.asp?") =0 then exit sub if (instr(httpreferer,"cag_leavecag.asp") >0) and instr(httpreferer,"cag_leavecag.asp?") =0 then exit sub Dim oConnBlink, MCur, Ycur, sSQL, oRsNew Set oConnBlink = Server.CreateObject("ADODB.Connection") OpenJet oConnBlink, "Cplog", "" MCur = Cint(DatePart("m",now)) Ycur = Cint(DatePart("yyyy",now)) sSQL = "select * from TblBrokenLinks where Scriptname = N'" & replace(Scriptname,"'","''") & "' " &_ " and httpreferer = N'" & replace(httpreferer,"'","''") & "' " &_ " and TrackMonth = " & MCur & " and TrackYear = " & Ycur Set oRsNew = Server.CreateObject("ADODB.Recordset") oRsNew.CursorLocation = 3 oRsNew.Open sSQL,oConnBlink, 3, 3 if oRsNew.RecordCount = 0 then with oRsNew .AddNew .Fields("Scriptname") = Scriptname .Fields("httpreferer") = httpreferer .Fields("TrackMonth") = cstr(MCur) .Fields("TrackYear") = cstr(Ycur) .Update end with end if set oRsNew = nothing Set oConnBlink = nothing end sub %>