How about SWITCH/CASE?
<cfswitch="#CGI.SERVER_NAME#">
<cfcase="www.something.com">
<cflocation url="index.cfm" addtoken="no">
</cfcase>
<cfcase="www.something2.com">
<cflocation url="knowledgebase.cfm" addtoken="no">
</cfcase>
<cfcase="support.something.com">
<cflocation url="support.cfm" addtoken="no">
</cfcase>
</cfswitch>
-----Original Message-----
From: Kevin Mansel [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 2:45 PM
To: CF-Talk
Subject: RE: Newbie - URL redirect?
There ya go :o)
<cfif #CGI.SERVER_NAME# IS "www.something.com">
<cflocation url="index.cfm" addtoken="no">
</cfif>
<cfif #CGI.SERVER_NAME# IS "www.something2.com>
<cflocation url="knowledgebase.cfm" addtoken="no">
</cfif>
<cfif #CGI.SERVER_NAME# IS "support.something.com">
<cflocation url="support.cfm" addtoken="no">
</cfif>
or you can use the cfelseif's of course...
-kevin
~~~~~~~~~~~~~~~~~
Kevin Mansel
Senior Web Developer
Fox Communications
[EMAIL PROTECTED]
DL : 425-649-1321
C : 425-346-7221
-----Original Message-----
From: Jon Dunn [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 2:36 PM
To: CF-Talk
Subject: Newbie - URL redirect?
How do I redirect an incoming url request to a specific directory on the
server?
I have multiple domain names routing to the same root directory - I'd like
to have each separate domain name be directed to the appropriate directory
to keep the different sites separated.
I've tried the following cf code provided by my hosting company:
<cfif server_name IS "www.domain2.com">
<cflocation url="directory2">
<cfelseif server_name IS "www.domain3.com">
<cflocation url="directory3">
<cfelseif...>
</cfif>
I've put this at the top of the default page in the root directory, but it
doesn't work. What am I missing?
TIA, jon
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=sts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists