This content has been marked as final. Show 4 replies
Thanks Dan (I sometimes think you must live on these forums, you're always first to answer my questions!)
CGI variables are strictly read-only and can't be modified at all.
If you can't use window.location = '< http://www.newlocation.com>';,
you could try a redirector using a META redirect:
I'm not sure what the CGI variables will do, though, so you should try
redirecting to your own page and cfdumping the cgi scope...
In article <email@example.com>
> My guess is that this isn't possible, but figured it was worth
> clarifying anyway.
> I have a page with a simple cflocation on it that sends the user to
> an external page. I need to somehow strip the referrer, mainly so
> that the site the visitor ends up on can't grab the search phrases in
> my url.
> The ideal way of doing this would be to remove the referring url
> before executing the cflocation tag, however obviously cflocation
> won't execute after a cfflush. Therefore, my idea was to use a cfset
> on cgi.http_referrer and set it as blank before executing cflocation.
> Assuming I can't write to CGI variables, are there any other
> methods that would work?
I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo
I think you really have nothing to worry about. What you seek is already there. It is actually the default CGI behaviour.
By definition, CGI.HTTP_REFERER is the URL of the page that sent the browser to the current page. Therefore, the variable CGI.HTTP_REFERER will only be populated if a visitor arrives at the page by means of a link of one kind or another. That is, by means of an ordinary link, a redirection, a form submission and so on. The variable CGI.HTTP_REFERER will be blank if the visitor arrives at the page by other means, such as by cflocation.
However, suppose that page1.cfm contains a link to page2.cfm and page2.cfm contains a cflocation to page3.cfm. Then the value of CGI.HTTP_REFERER at page3 will be the URL of page1.cfm, not that of page2.cfm. Test it yourself. Open page1.cfm, and then page2.cfm.
<a href="page2.cfm">to page2.cfm</a>