I have an application, let's say its running at
Currently, it serves content for the city of Boston only.
Let's say I want to expand my application to serve Los
Angeles, so I set up losangeles.mydomain.com
I need to serve different content for Los Angeles. For
example, when someone registers, I need to give them a drop-down
list of Los Angeles neighborhoods.
I have a very simple database structure right now, but will
expand it with a neighborhoods table that is tied to city with a
What I'm wondering is, what kind of variables would I set in
the application.cfm file or elsewhere to ensure that a given user
gets content specific to them based on the subdomain they have
accessed? Would I set a cookie, like cityID=4 that is read in with
each page hit and continually serves up the correct content? What
if a user has cookies turned off? Is there are better way to do
FYI, I am a little rusty at CF, and my knowledge extends
mainly through version 6.
You could use the cookie scope. I think many would use the
scope for this kind of data as well, but that ultimately
still relies on
cookies and|or URL parameters to identify the which user goes
For your simple example, the cgi structure could be of use.
allow you to determine what domain brought the user to the
This information could then be used to branch the