Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 497835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:49:11+00:00 2026-05-13T05:49:11+00:00

I need a CFM script to place on my website homepage. If a visitor

  • 0

I need a CFM script to place on my website homepage.

If a visitor arrives from a search engine using a a certain search
phrase, I want to redirect them to various pages.

For example:

The following searches would redirect to the following pages:

become a business coach -> http://www.businesscoach.com/BusinessCoaching.html

find a business coach ->
http://www.businesscoach.com/go/bc/find-a-business-coach/index.cfm

please help me to do this…

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:49:11+00:00Added an answer on May 13, 2026 at 5:49 am

    First you need to analyze the referer string, if not empty. This can be done in different ways.

    Consider this Google-like string:

    <p><a href="referer.cfm?q=become+a+business+coach&ie=utf-8&oe=utf-8">test</a></p>
    

    Same referer.cfm should perform the check.

    Say, simplest and totally not flexible way is to search through the referer:

    <cfif cgi.HTTP_REFERER NEQ ""
          AND FindNoCase("business", cgi.HTTP_REFERER)
          AND FindNoCase("coach", cgi.HTTP_REFERER)>
    
        <cflocation url="http://where.you.want.to.go.tld/" addtoken="false">
    
    </cfif>
    

    More advanced approach can be the search through the search query keywords. First you should split the string:

    <cfif cgi.HTTP_REFERER NEQ "">
    
        <!--- extract the search phrase --->
        <cfloop list="#cgi.HTTP_REFERER#" delimiters="&" index="token">
    
            <cfif FindNoCase("?q=", token)>
    
                <cfset phrase = ListLast(token, "?q=") />
    
                <!--- extract the keywords --->
                <cfloop list="#phrase#" delimiters="+" index="keyword">
    
                    <!--- search needed keyword and perform relocation --->
    
                </cfloop>
    
            </cfif>
    
        </cfloop>
    
    </cfif>
    

    How to search the keyword — up to you, maybe query the database and search matches, maybe create configuration directly in code. In both ways I’d used set of structures like this example:

    <cfset rule = StructNew() />
    <cfset rule["keywords"] = "become,business,coach" />
    <cfset rule["url"] = "http://where.you.want.to.go.tld/" />
    

    When keywords match the search phrase, use url to relocate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a way to create an object from a location value. For example
I am using ColdFusion 9.0.1. I have a new web site that uses Bikes.cfm
I need to invoke a ColdFusion function(present in a .cfm file) when the user
I'm going to repeat a question I asked earlier but I need help using
I need an alternative to using the CF function imageNew(). I started to use
I need a Application.cfm like project level file for PHP.
I'm working on a Coldfusion project where I need to pull some information from
I need a simple redirect for my pages. I need the following rewritten: http://abc.de/application/index.cfm/fuseaction/home.uebersicht/idLand/44/idReiseart/268/web/Aktivreisen-Wanderreisen.htm
I need to implement Sign Sign Out in Java using Spring Security. What CAS
How do I create Search Engine Safe URLs in Fusebox 5.1 noxml? For instance,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.