<cfsilent>
<cfparam
name="URL.cflocation"
type="string"
default="No"
/>
<cfparam
name="URL.relocate"
type="boolean"
default="false"
/>
<cfif URL.relocate>
<cflocation
url="#CGI.script_name#?cflocation=Yes"
addtoken="false"
/>
</cfif>
</cfsilent>
<cfoutput>
<!DOCTYPE html PUBLIC "- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>ColdFusion CFLocation And HTTP Referer</title>
</head>
<body>
<p>
CFLocation: #URL.cflocation#<br />
Referrer: #ListFirst(
ListLast( CGI.http_referer, "\/" ),
"?"
)#
</p>
<p>
<a
href="#CGI.script_name#"
>Refresh</a>
|
<a
href="#CGI.script_name#?relocate=true"
>Refresh With CFLocation</a>
</p>
</body>
</html>
</cfoutput>