Hi Roman,
You could do this by checking the hostname in webroot/index.php and
setting the correct path.
You could set up a local hostname to dev on, eg joebloggs.domain.com,
then you can have a staging server eg staging.domain.com and the live
server www.domain.com. then add a switch statement inside
webroot/index.php to set the location of the cake core, eg:
switch(env('HTTP_HOST')) {
// Joe Bloggs/John Doe
case 'joebloggs.domain.com':
case 'johndoe.domain.com':
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH',
PATH.DS.TO.LOCAL.DS.CAKE.LIBS);
}
break;
// Statging
case 'staging.domain.com':
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', PATH.DS.TO.CAKE.LIBS);
}
break;
// Live
default:
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', ROOT);
}
break;
}
hth
Jon
2009/9/23 The Roman <[email protected]>:
>
> Thanks for the response. As you say, the setup was overly
> complicated, and going back to square one certainly helped. I had
> followed advice (as I read it, anyway) from the an article on the
> bakery and moved webroot/index down a level into app, which just
> confused the situation even if it was not a problem. Also I had
> rename the cake_1.2.5 directory which does seem to upset the apple-
> cart. I wanted to do that so that I had nicer looking urls, but I can
> live with what I have. I have no problems renaming the app dir
> itself, which is enough for me.
>
> As you say, I simply wound up specifing CAKE_CORE_INCLUDE_PATH to
> point to cake and vendors directories which had been removed to
> somewhere outside the subversion tree.
>
> Many Thanks,
> Roman.
> >
>
--
jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---