in the root index.cfm, not the application.cfm ;-)
<!--- unsure... if the user is using http 1.0 will http_host exist? better
make sure it does... --->
<cfparam name="cgi.http_host" default="">
<cfswitch expression=#cgi.http_host#>
<cfcase value="www.yahoo.com">
<cflocation url="/yahoo_files/" addtoken="no">
</cfcase>
<cfcase value="www.excite.com">
<cflocation url="/excite_files/contents.cfm" addtoken="no">
</cfcase>
<cfdefaultcase>
<cflocation url="/other_files/" addtoken="no">
<cfdefaultcase>
</cfswitch>
btw be aware you do need to setup the 3 domain names to point to the same IP
(egads! I'm a bean!)
----- Original Message -----
From: "Parker, Kevin" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 2:28 PM
Subject: Redirects
> I have a situation where I want three domain names to point to a given IP
> address but I want the user to see different parts of the site dependant
on
> which name they come in via. Someone gave me this bit of ASP to do the
> trick. Can it be done with CF.
>
> TIA!!!!!!!!!!!
>
>
>
> <%response.buffer=true%>
> <html><head>
> <title>Enter Page</title>
> </head>
> <body>
> <%
>
> if Request.ServerVariables("HTTP_HOST")="www.domainone.com" then
> Response.Redirect("http://www.domainone.com/page1")
> end if
> if Request.ServerVariables("HTTP_HOST")="www.domaintwo.com" then
> Response.Redirect("http://www.domainone.com/page2")
> end if
> if Request.ServerVariables("HTTP_HOST")="www.domainthree.com" then
> Response.Redirect("http://www.domainone.com/page3")
> end if
> %>
> </body></html>
>
>
>
>
> ****
>
> Kevin Parker
> Web Services Manager
> WorkCover Corporation
>
> [EMAIL PROTECTED]
>
> www.workcover.com
>
> p: +61 8 82332548
> f: +61 8 82332000
> m: 0418 800 287
>
>
>
>
>
>
****************************************************************************
> This e-mail is intended for the use of the addressee only. It may contain
> information that is protected by legislated confidentiality and/or is
> legally privileged. If you are not the intended recipient you are
prohibited
> from disseminating, distributing or copying this e-mail. Any opinion
> expressed in this e-mail may not necessarily be that of the WorkCover
> Corporation of South Australia. Although precautions have been taken, the
> sender cannot warrant that this e-mail or any files transmitted with it
are
> free of viruses or any other defect.
> If you have received this e-mail in error, please notify the sender
> immediately by return e-mail and destroy the original e-mail and any
copies.
>
****************************************************************************
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists