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:266052
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4