Skip to content

Instantly share code, notes, and snippets.

@scarstens
Created August 23, 2017 03:13
Show Gist options
  • Save scarstens/194dc592bed5e5c5f842fdab1c898963 to your computer and use it in GitHub Desktop.
Save scarstens/194dc592bed5e5c5f842fdab1c898963 to your computer and use it in GitHub Desktop.
multisite-top-level-domain-config
<?php
if (!empty($_SERVER['HTTP_HOST']))
{
$site = get_site_by_path(strtolower($_SERVER['HTTP_HOST']), '/');
define('COOKIE_DOMAIN', '.'.$site->domain);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment