<% On Error Resume Next Const strMessageURL = "/omhweb/custom_errors/maintenance.html" Const strTargetURL = "http://bi.omh.ny.gov/aot" Const strTestURL = "http://omhaspp2.omh.ny.gov:7777/status/aot_status.txt" Dim objXmlHttp Set objXmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP") objXmlHttp.Open "GET", strTestURL, False objXmlHttp.send If Err.Number = 0 Then While objXmlHttp.readyState <> 4 ' Wait for the response. Wend If objXmlHttp.Status < 400 Then ' Portal test file available. If Left(Trim(UCase(objXmlHttp.responseText)),2) = "UP" Then Set objXmlHttp = Nothing Response.Redirect(strTargetURL) ' Redirected to Portal page. End If End If End If ' If not redirected to Portal page, then display a message. Response.Redirect(strMessageURL) Set objXmlHttp = Nothing %>