However they are having users submit stuff via form.
So I am sure there is another way but I threw something in there
for them:
I am sure someone will post a better example but here is one since
it is a form variable.
If you can be sure they are using the standard naming conventions
for the URL, then to obtain the server name you could do something
like:
<cfset myURL = "http://www.abc.com/index.cfm?id=5009">
<CFSET st_num = 1>
<CFSET sep_num = 0>
<CFOUTPUT>
<CFLOOP CONDITION="sep_num NEQ 3">
<CFSET st_num = Find("/",myURL,st_num)>
<cfset sep_num = sep_num + 1>
<cfset st_num = st_num + 1>
</CFLOOP>
</CFOUTPUT>
<CFSET SERVER_INFO = LEFT(myURL,st_num-1)>
<cfset SCRIPT_INFO = MID(myURL,st_num,LEN(myURL))>
>>> [EMAIL PROTECTED] 10/01/03 09:23AM >>>
I thought cgi_SERVER_NAME would return : www.abc.com , if that is what
the user was accessing with.
- Calvin
----- Original Message -----
From: Randell B Adkins
To: CF-Talk
Sent: Wednesday, October 01, 2003 7:23 AM
Subject: Re: Extract Domain and scriptname seperate
WHat you are looking for are the following:
CGI.SEVER_NAME = http://www.abc.com
CGI.SCRIPT_NAME = /index.cfm?id=500
>>> [EMAIL PROTECTED] 10/01/03 07:19AM >>>
Hi,
I am looking for a way to extract the domain name and the script
name
to be
seprated.
Eg: Following is my URL
http://www.yourname.com/abc/support.cfm?abc=123
then it should return 2 different values seperate
http://www.yourname.com and /abc/support.cfm?abc=123
or
http://www.abc.com/
should return just http://www.abc.com
or
http://www.abc.com
should return just http://www.abc.com
Ketan Patel
G3 Technology Group, LLC
Graphics III Advertising, Inc.
(410)789-7007 or (800)783-1799
"It's Not Creative if it doesn't Sell."
http://www.g3group.com <http://www.g3group.com>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

