The referer is the page they came FROM. Meaning if they click a link and
that is not found you will get the page they clicked the actualy link, not
the missing page.
I have a similar script set up. When the referer is blank I know they were
going DIRECTLY
to that page by typing in the URL, when the referer is populated then I know
they bad LINK is on that page. Create a test page that links to a non
existent page,
click the link and see if the referer then fills in. Instead of just going
to a bad URL.
Kelly
> -----Original Message-----
> From: SHEETS, DAYV (PB) [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, April 03, 2001 12:08 PM
> To: CF-Talk
> Subject: 404 Page
>
> Hello,
>
> I am attempting to put into effect error handling on my 404 pages so that
> it
> emails me (via cfmail). I am using the following code to generate this:
>
> <snip>
>
> <CFSET #address# = "#cgi.remote_addr#">
> <CFSET #host# = "#cgi.remote_host#">
> <CFSET #referer# = "#cgi.http_referer#">
> <CFSET #agent# = "#cgi.http_user_agent#">
> <CFSET #page# = "#cgi.script_name#">
> <CFIF #host# is "">
> <CFSET #host# = "unknown">
> </CFIF>
> <CFIF #referer# is "">
> <CFSET #referer# = "unknown">
> </CFIF>
>
>
> <cfmail
> from="#[EMAIL PROTECTED]#"
> cc="#[EMAIL PROTECTED]#"
> to="#[EMAIL PROTECTED]#"
> subject="404 Error Encountered"
> >
> 404 Error Encountered:
>
> IP: #address#
> Host: #host#
> Referer:
> #referer#
> Agent: #agent#
> page: #page#
> host: #host#
>
> </cfmail>
>
>
> Sorry, the URL <cfoutput>#referer#</cfoutput> either does not exist, or
> has
> been removed from our site.
> An email has been send to the Webmaster to inspect this error further.
> <br>
>
> </snip>
>
>
> The problem is that I am not receiving everything BUT the referring page.
> Is
> there something else I am overlooking/need to be doing?
>
> Thanks in advance for your assistance,
>
> Dayv
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists