John,

If you don't want to look for www. & .com use contain rather than is:
<cfif cgi.server_name contains "shirleywolcoski">

I use a virtual directory called "rootdir" that can be altered for each
site, so it would look something like this:
<cfif cgi.server_name contains "shirleywolcoski">
        <cfset rootdir = "/shirleywolcoski">

Then all other paths are relative to the rootdir variable.
Seems to work well, no caveats...yet.


-----Original Message-----
From: Pete Freitag [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 29, 2000 1:12 PM
To: [EMAIL PROTECTED]
Subject: RE: Server_Name


Yes it should work ok, but keep in mind what if someone types in the IP
address, then the IP address is the server name.  Also if I typed in
domain1.com then I wouldn't match anything either.  So add the sites without
the www. and also have a default case just incase something unexpected comes
along.

____________________________________________
Pete Freitag
CFDEV.COM
Cold Fusion Developer Resources
http://www.cfdev.com

-----Original Message-----
From: John Bowering [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 29, 2000 3:40 PM
To: [EMAIL PROTECTED]
Subject: Server_Name


Has anyone had any problems relying on the 'server_name' variable?  I am
trying to find a way to host 2 (or more) sites on one hosting account. Just
wondering how reliable it is.


This would be the index.htm:
<cfif server_name is 'www.Domain1.com'>
        <cflocation url="/domain1">
<cfelseif server_name is 'www.domain2.com'>
        <cflocation url="/domain2">
</cfif>


Or, if anyone has a better idea, can ya share?  I would prefer not to pay
for 2 or more accounts for sites that aren't bringing in any money right
now.

Thanks,
John





----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to