1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can I assign multiple cookies in config.php?

Discussion in 'XenForo Questions and Support' started by LPH, May 29, 2013.

  1. LPH

    LPH Well-Known Member

    Hi,

    I'm trying to figure out what is allowed in the library/config.php file?

    Something along the line:

    PHP:
    if ($_SERVER['HTTP_HOST'] == 'www.whatisnew.com') {
     
    $config['cookie'] = array(
    'prefix' => 'xs1_',
    'path' => '/',
    'domain' => '.whatisnew.com'
    );
     
    } else {
     
    $config['cookie'] = array(
    'prefix' => 'xs1_',
    'path' => '/',
    'domain' => '.tuxreportsnetwork.com'
    );
     
    }
     
    I know this looks goofy but is something like this possible?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yes that should work.
     

Share This Page