> How can I make this statement 'correct' ?
> Even if the remote_host is the variable, it defaults to the cfelse.
>
> <cfif cgi.REMOTE_HOST eq "http://www.espn.com/soccernet">
Ade is right. remote_host doesn't contain the protocol (http://) or the
directories (soccernet). Remote Host actually contains the IP address
of the server that is being access. This would be the IP address for
www.espn.com.
What you are probably looking for is a cgi.server_name and
cgi.path_info. cgi.server_name contains the fqdn for the site you are
accessing (www.espn.com) and cgi.path_info will contain the directory
structure and file being access (/soccernet/index.cfm)
If its the site that refered visitors to your site, then you need to
look at cgi.http_referer.
Be aware that some or all of the CGI scope variables change depending on
what web server the site is hosted on and can be altered by the likes of
Norton Internet Security on the client side to remove http_referer etc.
A cfdump of the cgi scope will help you decide which variables you
actually want to check.
Hope that helps
Regards
Stephen
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
