Advertisement

02.08.2008 at 12:34PM PST, ID: 23148947
[x]
Attachment Details

Cold Fusion Redirect Script

Asked by styleteks in ColdFusion Application Server, ColdFusion Studio

I'm looking to perform a redirect that can accommodate file names in the originating link.  The issue is I've relocated a domain onto a shared server and created a sub-web, however, the host has no ability to setup the domain to point to the sub web folder.

For instance, let's say I have a domain called domain.com, and I want to point this to a folder called "Home".  So, I use one of the common redirect scripts for CF as follows:

<cfif cgi.server_name IS "domain.com">
  <cflocation url="home" addtoken="no">
</cfif>

OR, I USE...

<cfswitch expression="#cgi.server_name#">
  <cfcase value="domain.com">
    <cflocation url="home" addtoken="no">
  </cfcase>
</cfswitch>

However, the issue arises when I have referrer links across the internet that point to a specific page on that domain.  So, let's say your site has a link to point to www.domain.com/thispage.cfm.  Now, this link is broken, since CF does not seem to forward to www.domain.com/home/thispage.cfm

Is there any hope I am missing something here, and this can be corrected with some relatively simple code?  I really do not wish to move this site again.Start Free Trial
[+][-]02.08.2008 at 01:30PM PST, ID: 20854355

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.08.2008 at 02:17PM PST, ID: 20854719

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.11.2008 at 08:03AM PST, ID: 20867398

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.11.2008 at 09:06AM PST, ID: 20867984

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.16.2008 at 07:04PM PST, ID: 20912394

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.19.2008 at 09:29AM PST, ID: 20930517

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.19.2008 at 12:05PM PST, ID: 20932016

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Application Server, ColdFusion Studio
Sign Up Now!
Solution Provided By: SidFishes
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628