I've never used request scope variables. I did find this info in the CF Documentation:
"The Request scope is a reserved variable/scope that allows you to store data pertaining to the complete hierarchy of custom tags used in a single page request." Seems to be made for this sort of thing as opposed to Application or Session. When you wrote: "you should be setting request-scoped variables in the application file and set them for every request, not just the first one." Do you mean that each page of the site should re-define the request scope variables, instead of just the first page (index.cfm?) I figured that once I had some global variables set, I wouldn't need to run the query involved for each page. For the topgraphic, say, I was just running a query and getting the name of the appropriate graphic and assigning that name to the Application.TopGraphic variable and using an <IMG> tag to place the graphic. Are you saying allow the application.cfm to run the query and re-define that graphic for each page? Is that the only way to prevent users from seeing the wrong site graphics and information when the variables change? Concerning the application.cfm page being accessed when I open a bookmarked index.cfm page: It wasn't accessing the page automatically. I tested this by having the application.cfm page output some variables and abort to see if it was being accessed. Only when I refreshed the bookmarked index.cfm did the output occur from application.cfm. That confuses me. I thought it happened automatically every time. That behavior is what I'm depending on. It may be just a localhost production behavior.... Rick -----Original Message----- From: Ben Doom [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 5:02 PM To: CF-Talk Subject: RE: One dynamic site for multiple indepentdent businesses To find out what domain is being accessed, simply look at the cgi.server_name variable. You could use a cfswitch to check the server name and set appropriate variables accordingly. Since in IIS (IIRC) you can set as many domains as you want to point to a single directory, you need maintain only one set of code (which seems to be your goal) but simply add whatever information is needed in the application.cfm file and whatever graphics, stylesheets, etc are necessary in order to create a new site. For a little less flexibility (but increased ease of setup) you could simply set a variable to the name of the domain (minus the www. and .com or whatever) and have external files like domain.css and domain_logo.gif such that you simply need add the external files and not worry about a switch. I agree with Kieth that you should be setting request-scoped variables in the application file and set them for every request, not just the first one. If you are surfing site 1, and I go to site 2, the application variables get reset and suddenly you are looking at site 2. I don't think that was your intent. As for the "sticking" site, I again urge you to check whether it could be cached from a previous session. I say this because if the application is actually called (that is, any .cfm file is accessed) then the application.cfm file is run. There might be some problems with latency, but I kinda doubt that. So, make sure that your browser isn't caching the page. --Ben Doom Programmer & General Lackey Moonbow Software : -----Original Message----- : From: Rick Faircloth [mailto:[EMAIL PROTECTED]] : Sent: Monday, December 02, 2002 4:16 PM : To: CF-Talk : Subject: RE: One dynamic site for multiple indepentdent businesses : : : Hi, Ben and thanks for the reply. : : Yes, each business will have its own domain. : All the files for the site will be in one folder and subfolders : "RentalCompanies". : : I've been pulling the BusinessID from the bookmarked URL and : assigning that to Application.BusinessID and using that on each page : when needed to ID the Business. (I finally started using <CFLOCK> today : and turned on "Full Checking" or whatever the setting is called on my : production box, : and went throught the site and eliminated all errors, so I guess the : Application and : Session variables aren't an issue any more. : : Can you give me an example of code concerning how to determine which : business' info should be displayed based on domain for each page request? : Would there have to be queries on each page to pull the graphics each time : a page is requested? I was trying to define a persistent variable : (Application.BusinessID) : that would be globally available to the site. I need to query a second : database : based on the BusinessID key. : : At this point, the site is just a concept and I don't have actual domains : yet. : How would I work it for the temporary addresses, which are all the same at : this point, : except for having the BusinessID attached to the URL... : : One question is: Why isn't the Application.cfm page being : accessed whenever : I pull up a new bookmarked URL? If that would happen, I might just have : this licked... : : Thanks for your help. : : 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.

