Honestly, I would not rely on CGI.Anything to identify your users.  Ask
them to sign in once, or select their domain on the front end, and just
create a cookie on their machine.  

If you have some other reason to stick with the CGI.HTTP_HOST, then I
would look into doing a <cfswitch> statement, with a default of some
generic DSN so a user wont generate an error coming from some place you
are not expecting.

Just my $.02

Chris Peterson
Gainey Corporation 

-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 09, 2007 11:28 AM
To: CF-Talk
Subject: App Organizational Question...

Hi, all.

Would it be better to identify users of a common app by
CGI.HTTP_HOST and put in my Application.cfm (yes, .cfm. CF 4.5 here)
lines such as:

<CFIF CGI.HTTP_HOST contains "bodaford_homes.com">

     <CFSET DSN = "bodaford_homes">

<CFIF>

or

Should I automate the process of DSN identification by
using a MID function to select the domain name from the
CGI.HTTP_HOST variable.

(Pseudo code, because I can't remember right off how to 
select the string to the left of the last "." in the domain name).  :o/
)

<CFSET DSN = (characters to the left of the last "." and, if present,
after
the next "." to the left, or the "/" to the left of the domain, in case
someone types in the
URL without using www, such as http://bodafordhomes.com)>

With this second approach, I don't have to modify the .cfm every time I
add
a new client to use the app.

The first approach requires a new <CFIF> statement based on the domain
name
and DSN that I set up.

Which way would be preferable?  Pitfalls to each?  Perhaps a better
approach
than
either of these two?

(It's too bad CF 8 isn't out now so I could make this major shift in how
I
develop apps
along with learning to employ CF8. but alas, I have to strike while the
iron's hot.)

Thanks,

Rick





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266118
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to