404 Error Pages. Can someone explain to me why my custom 404.asp page will not report anything? I have the code that 4 guys uses with no luck. Thanks in advance
I'm not familiar with 4guys article on this,<BR>so post some code.<BR><BR>and by not reporting, you mean what exactly?<BR><BR>is it supposed to email you the link? save to log, what?
Code from 404.asp (My "page not found" page)<BR><%<BR> Dim URL, Referer<BR> strPath = Request.ServerVariables("PATH_TRANSLATED")<BR> strURL = Request.ServerVariables("HTTP_URL")<BR> strURL = Right(strURL, (Len(strURL) - (Instr(strURL, chr(59)))))<BR> <BR> strReferer = Request.ServerVariables("HTTP_REFERER")<BR> <BR> Mybody = "PATH: " & strPath & vbCrLf<BR> MyBody = MyBody & "URL: " & strURL & vbCrLf<BR> MyBody = MyBody & "Referer: " & strReferer & vbCrLf<BR><BR> <BR> MailTo = "firstname.lastname@example.org"<BR> MailSubject = "Error Report from 404 page."<BR> MailFrom = "email@example.com" <BR> Set MyCDONTSMail = CreateObject("CDONTS.NewMail")<BR> MyCDONTSMail.From= MailFrom<BR> MyCDONTSMail.To= MailTo<BR> MyCDONTSMail.Subject= MailSubject<BR> MyCDONTSMail.Body= MyBody<BR> MyCDONTSMail.Send<BR> set MyCDONTSMail=nothing <BR>%><BR>From my understanding, HTTP_Referer is supposed to contain the page that contains the bad link. And HTTP_URL is supposed to be the page that the user tried to reach? Thanks