We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27449
    • 211 Posts
    Hello!!!

    I’ve installed a subsites plugin and I created the subdomain...
    but I don’t understand how the plugin work!!!?

    $e = &$modx->event;
    $subdomain = ’subdomain.yourdomain.com’; // your subdomain name here
    if($e->name==’OnWebPageInit’) {
    $s = $_SERVER[’HTTP_HOST’];
    if($s==$subdomain && $modx->documentIdentifier==$modx->config[’site_start’]){
    header(’Location: index.php?id=6’);
    exit;
    }
    else if($s==$subdomain){
    $modx->config[’site_start’] = 6; // your start page here
    $modx->config[’error_page’] = 6; // your error page here
    }
    }


    When I run the subdomain shouldn’t have to go for the id=6!!?
    Why when I run the subdomain goes for the homepage!!?

    I need to do something?