Just set up a mapping on the production server that maps the site root to
"mywebsite2". Then specify the package using "mywebsite2" and it will work
in both places the same way. Locally, because the site is in a subfolder or
the root named "mywebsite2", and in production because of the mapping.

On Fri, Jun 13, 2008 at 5:52 AM, Didgiman <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I really hope someone can help me out here, as I can't figure out how to do
> this.
>
> Lets assume the following structure (on my local pc):
>
> > wwwroot
> > > mywebsite1
> > > mywebsite2
> > > > Application.cfc
> > > > ApplicationProxy.cfc (which basically just extends Application.cfc)
> > > > admin
> > > > > Application.cfc
>
> I imagine this setup is not that uncommon. On my development pc I have
> multiple sites in the webroot.
> So if I want to extend the Application.cfc in the admin folder (which would
> have the cflogin logic), I would have to use <cfcomponent
> extends="mywebsite2.ApplicationProxy">.
>
> But when I move the site online, it's the only site in the webroot:
> > wwwroot
> > > Application.cfc
> > > ApplicationProxy.cfc (which basically just extends Application.cfc)
> > > admin
> > > > Application.cfc
>
> In this scenario, the admin Application.cfc should extend the main
> Application.cfc like this: <cfcomponent extends="ApplicationProxy">
>
> I think so far I'm making some sense, right?
>
> Now, what do I have to do to be able to use the same code for development
> and production? I cannot evaluate the correct path to the root
> Application.cfc like this:
>
> <cfcomponent extends="#IIF(cgi.server_name EQ '127.0.0.1',
> DE('mywebsite2.ApplicationProxy'), DE('ApplicationProxy'))#">
>
> ...because I get this error: "This expression must have a constant value".
>
> I'm sure I'm not the first to have this problem. Can someone please
> guide me through this? I really want to use the same code for
> development and production.
> I'm on a shared hosting, so I can't do server mappings, and I think
> application mappings can't be useful here.
>
> What am I missing here?
>
> Thank you for reading my (quite lengthy) post.
>
> Wim
> Belgium
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307411
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to