Hi Thane, You could possibly append 'subdomaindirectory' to the beginning of the cgi.script_name variable and cflocate to there.
Pseudo code: <!--- check if user is in subdomain or not ---> <cfif listfindnocase(cgi.script_name, 'subdomaindirectory', '/')> you're already there <cfelse> <!--- build new url with subdomain ---> <cfset location = "http://" & "#cgi.server_name#" & "/" & "subdomaindirectory" & "#cgi.script_name#"> <cflocation url="#location#"> <cfabort> <!---optional ---> </cfif> I've not tested this throughly but should work in most cases. HTH, Dave > -----Original Message----- > From: Thane Sherrington [mailto:[EMAIL PROTECTED] > Sent: 04 June 2003 12:16 > To: CF-Talk > Subject: Handling subdomains > > > I have a subdomain that was recently moved from a primary > domain, and I'm > having problems getting to some of the pages in it. > > For instance: > I type www.domainname.com and takes me to > www.domainname.com/subdomaindirectory - so that works. > But if I type www.domainname.com/subdirectory, then it takes me to > www.domainname.com/subdirectory/subdomaindirectory - and of > course that > doesn't work at all. > > I'm using cflocations in the application.cfm to move me > around depending on > the names in the subdomain, but I'm doing something wrong. > > Anyone know how to make: > www.domainname.com/subdirectory take me to > www.domainname.com/subdomaindirectory/subdirectory? > > T > > > Tired of your bookmarks/favourites being limited to one > computer? Move > them to the Net! > www.stuffbythane.com/webfavourites makes it easy to keep all your > favourites in one place and > access them from any computer that's attached to the Internet. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

