Have you considered using cfinclude rather than cflocation?
eg:
<cfswitch expression="#cgi.server_name#">
<cfcase value="mysite1.com">
<cfset brand = "mysite1">
</cfcase>
<cfcase value="mysite2.com">
<cfset brand = "mysite2">
</cfcase>
<cfdefaultcase>
<cfset brand = "mysite3">
</cfdefaultcase>
</cfswitch>
<cfinclude template="../#brand#/#cgi.script_name#">
If all requests come through the index.cfm (as in eg fusebox) then
this works a treat. Otherwise its going to need a bit more thought,
but i'd say its still going to be preferable to doing a cflocation.
Cheers
Bert
On Sat, 29 Jan 2005 12:58:54 -0500, Les Mizzell <[EMAIL PROTECTED]> wrote:
> I've got a client that's decided to host a bunch of different sites
> under one domain. Though the hosting company is suggesting that I use a
> PHP script to handle the domain redirects, I'm a PHP noob, so I'd rather
> go with something I know.
>
> So, in the root directory I figure I can just add this to the
> Application.cfm file to take care of it:
>
> <CFIF #CGI.SERVER_NAME# CONTAINS "abc.com">
> <CFLOCATION URL="whatever/index.cfm">
> </CFIF>
>
> Is there a better solution? I've also warned the client that this is
> going to make it darned hard to get the different domains spidered
> correctly by the search engines, but what the heck....
>
> Haven't tried it yet, but maybe include an index file with links
> containing a paragraph or two with proper descriptions and keywords for
> each site it's linking to. Regular users visiting the site wouldn't see
> this because they'd get redirected by the application file. I'm not 100%
> sure if the spiders would see it either but it's worth a try.
>
> --
> -----------
> Les Mizzell
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192311
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54