1 Reply Latest reply on Nov 23, 2007 7:24 AM by CF_DAWG

    invoking a cffunction from a subdomain?

    mr. modus Level 1
      Hello all,

      I'm hoping this can be done and I'm just not sure how. I have a domain and subdomain for the admin of the website.
      Say www.mysite.com and admin.mysite.com. On my server I have a main folder which contains a folder for the site (which the main domain is pointed to) and I have a folder for the admin (which the subdomain is pointed to.)

      Main Folder > Website
      Main Folder > Admin

      Inside my admin folder I have a folder called globalFunctions with a number of cfc's which I am using cfinvoke to call.
      Main Folder > Admin > globalFunctions

      <cfinvoke component="globalFunctions.eComm" ....... />

      What I want to do is call some of these cfc's from the website folder. However since cfinvoke targets from the root folder the domain is pointed to I'm unable to get one folder level up from the site folder. Is there any way to do this?

        • 1. Re: invoking a cffunction from a subdomain?

          I think this is possible with a CF mapping set up on the server. Because when you call a CFC, you call it by a path. Like mySite.admin.globalFunctions. There could be a CF mapping that points to say C:\websites\mySite\admin\globalFunctions. If you are using CF8, you can create mappings per application. Just define them in your Application.cfc.
          You can use something like this in your Application.cfc: <cfset StructInsert(THIS.mappings, "globalFunctions", "c:\websites\mySite\admin\globalFunctions")>

          I hope this is what you were looking for.