I guess you could do something like:

bootstrap.php

        $tld = strrchr($_SERVER['SERVER_NAME'], '.');
        Configure::load('config' . $tld);

or with parse_url or regex.

Andras Kende
http://www.kende.com


On Jan 18, 2013, at 7:08 AM, MetZ <[email protected]> wrote:

> Hi..
> 
> I am wondering the best approach to load different config files according to 
> TLD?
> 
> domain.TLD1
> domain.TLD2
> domain.TLD3
> 
> config/config_TLD1.php
> config/config_TLD2.php
> config/config_TLD3.php
> 
> Today I am using only the config_TLD1.php (loaded in bootstrap).
> 
> Any suggestions?
> 
> Thanks!
> -Tom
> 
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> 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].
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to