On 2/2/01, Josh R penned:
>For example: If they come to www.oldsite.com/price-quote.cfm I want to move
>them over to www.newsite.com/price-quote.cfm
>
>Such as the pseudo code below?
>
>cfif FindNoCase("oldwebsite.com", CGI.Server_Name)>
>
>cflocation url="http://www.newsite.com/#SCRIPT_NAME#?#QUERY_STRING#"
>addtoken="YES">
>
>/cfif>
>
>
>What do I need to make this work? If I place this in our application.cfm, am
>I on the right track?

Something like this should work:

<CFIF cgi.http_host does not contain "newsite.com">
<cfset newurl = "http://www.newsite.com" & cgi.script_name>
<CFIF cgi.query_string IS NOT ""><cfset newurl = newurl & "?" & 
cgi.query_string></CFIF>
<CFLOCATION url="#newurl#" addtoken="no">
</CFIF>
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to