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_na
me#">
<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.cfmIs 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