Based on your comment...

"FYI - the cgi.http_referer variable isn't always present on a given request
 - it can be filtered out by firewalls and the like."

...it would seem that my method of:

 checking for the existence of ".com" in the HTTP_Referer and, if it's
present,
taking the HTTP_Referer and IDing the company's domain,
naming the CFApplication based on the HTTP_Referer,
assigning the HTTP_Referer value to a Server scope variable...

...then upon returning to any pages from within my server (which would
change the HTTP_Referer
and eliminate the company's domain name from it and render that variable
useless)
use a new CFAppliation function to reassign the value from the Server scope,
then
(as you suggested) transfer the Server scope variable to another Application
variable,
(or something that is contained within the Application that's running, and
thereby,
not relying on the use of Server scope variables which could be changed or
deleted
by other Applications running), then working from that point off that
Application,
until the user used the www.bodafordhomes.com name again or some other
domain with .com and the process would reset and start over...

...would not provide consistent performance because of the potential
filtering
of the HTTP_Referer variable?

If so, that's a problem...

Rick



-----Original Message-----
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 11:49 AM
To: CF-Talk
Subject: Re: Possible to name Application, save name, then rename
Application?


Considering that you also have to identify a client, the server scope alone
may not quite get you where you need to be with this. You'll need to figure
out how to identify each browser, for instance, you could create a server
scoped structure ( server.clients ) which would then contain a list of ip
addresses for different browsers drawn from the cgi.remote_addr variable, or
you could use CF's CFID and CFToken pair although off the top of my head I'm
not sure if they vary between applications. I don't think they do, but I
wouldn't be surprised if I'm wrong. :)

Here's an example:

<cfif listlast(cgi.http_referer,".") is "com">

<cflock scope="server" type="exclusive">
        <cfparam name="server.client"
                type="struct" default="#structnew()#">
        <cfset server.client[cgi.remote_addr] = cgi.http_referer>
</cflock><cfset variables.domain = cgi.http_referer>

<cfelse>

<cflock scope="server" type="readonly">
        <cfif structkeyexists(server.client,cgi.remote_addr)>
                <cfset variables.domain = server.client[cgi.remote_addr]>
        </cfif>
</cflock>

</cfif>

<cfapplication name="#variables.domain#" ...>

FYI - the cgi.http_referer variable isn't always present on a given request
-- it can be filtered out by firewalls and the like.

hth

s. isaac dealey                954-776-0046

new epoch                      http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

tapestry api is opensource     http://www.turnkey.to/tapi

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816



> I know that makes no sense, but here's what's happening.

> I'm name a site that serves as a dynamic site for multiple
> companies.
> I need to name the Application and set variables by the
> CGI.HTTP_Referer
> variable.
> No problem so far.

> However, since the site is blind forwarded to my server,
> the HTTP_Referer
> variable
> changes once it's working off my server.  When it comes
> from the company
> that
> handles my DNS, it comes as http://www.bodafordhomes.com,
> from which I can
> do a CFIF CGI.HTTP_Referer contains ".com" and that tells
> me that the
> homepage
> has been requested from somewhere besides my server and
> the ID of the
> company
> needs to be determined for the dynamic site to be setup.
> I have
> http://www.bodafordhomes.com
> stored in the database from which to ID the company and
> choose it's data.

> The problem comes when the pages are served from my
> server.  They use URL's
> like http://77.88.99.00/cfdocs/rea/index.cfm , so the new
> CGI.HTTP_Referer
> can't
> be used to determine company ID any longer and the
> Application can't user
> the CGI.HTTP_Referer
> any longer as a name, because the Application name has to
> stay the same to
> keep the variables
> tied to the Application...

> I need to store the first CGI.HTTP_Referer variable, then
> when the
> Application.cfm
> page is consulted, I can recall that saved original
> HTTP_Referer variable as
> some other
> variable and rename the Application.cfm with it.

> There's the question:  How to save that variable, since I
> can't use
> application or session
> variables because on the second trip to the
> Application.cfm page, the
> Application will
> not have been defined and therefore an error occurs.

> Is there some variable that can be created after the first
> Application is
> named, then
> continue to be used until the Application is renamed?

> (I have got to learn how to do my own DNS, then I probably
> wouldn't have
> this problem.
> But I only have one server, and I need two for DNS
> service...don't I?)

> If I can get past this part, I've got the rest of this
> "one site for many
> companies" licked...

> If this is all crazy and someone else has a solution for
> this situation, I'm
> all ears...uh...or eyes...

> Rick


> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Archives:
> http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
> Subscription: http://www.houseoffusion.com/cf_lists/index.
> cfm?method=subscribe&forumid=4
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Get the mailserver that powers this list at
> http://www.coolfusion.com

>                               Unsubscribe: http://www.houseoffusion.com/cf_lists/uns
>                               ubscribe.cfm?user=633.558.4



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to