On Mon, Jan 26, 2009 at 10:12 AM, Paul Ihrig <pih...@gmail.com> wrote:

> hey guys..
>
> trying to set up a ton of redirects in application.cfm
>
> they don't seem to be working.
>
> i want if  url is www.morel/tasty/
> to goto a addy...
>
> <cfif #CGI.SERVER_NAME# CONTAINS "www.morel.com/tasty/">
>        <cflocation url="/products/index.cfm?n1Id=1&n2Id=7" addtoken="no">
> </cfif>


Get rid of www first.

<cfset Request.ChannelName    =
ReplaceNoCase(CGI.SERVER_NAME,"www.","","ALL")>

switch based on server name and if you need tasty then you need to add
cgi.scriptname.

<cfswitch expression="#Trim(REQUEST.ChannelName)##CGI.ScriptName#">
    <cfcase value="morel.com/tasty <http://www.morel.com/tasty/>">
        <cflocation url="/products/index.cfm?n1Id=1&n2Id=7" addtoken="no">
    </cfcase>
<cfdefaultcase>
    leave this blank
</cfdefaultcase>
</cfswitch>

Casey


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318532
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to