Yes, that works, here it is:
<cfoutput>
http://#cgi.server_name##c
</cfoutput>
There is no other way to get the url other than CGI variables with the native Coldfusion languages. You can probably do it with Java, etc, but these all point to the same thing. server_name, script_name, and query_string are created by the server and not passed by the client. Hope that helps.
Main Topics
Browse All Topics





by: ShytKickerPosted on 2005-10-18 at 20:32:02ID: 15113276
Yes, use cgi variables. Do not be afraid, any cgi variable that doesn't start with "http_" prefix, is passed by the server and not the client (browser). But cgi variables that do start with http_ are passed by the client, those are the ones you shouldn't use. I believe you can do this:
pt_name#?# cgi.query_ string#
#cgi.server_name##cgi.scri
I'll verify that for you in a second.