%@LANGUAGE="VBScript"%> <% 'prevent any other errors from stopping execution Option Explicit On Error Resume Next '''Original Contents Dim requestpage:requestpage = replace(Request.ServerVariables("QUERY_STRING"),"404;","") Dim forumABSURL:forumABSURL = replace(Request.ServerVariables("SCRIPT_NAME"),"pgdrewrite.asp","",1,-1,vbTextCompare) Dim errorLogFileName:errorLogFileName = "upfiles/404.log" Dim requestedFile:requestedFile = lcase(right(requestpage,len(requestpage)-instrrev(requestpage,"/"))) if (requestedFile="tm.htm") then Server.Transfer (forumABSURL&"tm.asp") if (requestedFile="tt.htm") then Server.Transfer (forumABSURL&"tt.asp") if (requestedFile="printable.htm") then Server.Transfer (forumABSURL&"printable.asp") if (requestedFile="ini.asp") then Server.Transfer (forumABSURL&"ini.asp") if (requestedFile="boarddown.asp") then Server.Transfer (forumABSURL&"boarddown.asp") strDetail = "404 error occured: " & Now & vbCrlf & _ "Requested Page: "&requestpage& vbcrlf &_ "Referer: "& Request.ServerVariables("HTTP_REFERER") & vbcrlf &_ "Requested by IP: "&Request.ServerVariables("REMOTE_ADDR")&vbcrlf&_ "User Agent: "&Request.ServerVariables("HTTP_USER_AGENT") 'The following are for writing custom error logs Dim writeLog:writeLog = true if writeLog then Dim strErrorLog:strErrorLog = Server.mappath(errorLogFileName) Dim objFSO, objTStream, strDetail Dim blnFailedToLog Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objTStream = objFSO.OpenTextFile(strErrorLog, 8, True) '8 = ForAppending If Err.Number = 0 Then objTStream.WriteLine strDetail & vbCrlf & vbCrlf If Err.Number = 0 Then objTStream.Close blnFailedToLog = False Else blnFailedToLog = True End If Set ojFSO = nothing Set objTStream = nothing end if %> <% Response.Status = "404 Not Found" %>
The page cannot be foundThe page you are looking for might have been removed, had its name changed, or is temporarily unavailable.Please try the following:
HTTP Error 404 - File or directory not found.
|