Skip to content

Instantly share code, notes, and snippets.

@runningman84
Last active May 27, 2019 15:13
Show Gist options
  • Save runningman84/0eed81c26e6ee896c676756ecae08319 to your computer and use it in GitHub Desktop.
Save runningman84/0eed81c26e6ee896c676756ecae08319 to your computer and use it in GitHub Desktop.
wp_local_domains.php
<?php
$domains = array();
$mydomains = array();
if (getenv('WP_OFFLOAD_LOCAL_DOMAINS')) {
$mydomains = explode(' ', getenv('WP_OFFLOAD_LOCAL_DOMAINS'));
}
if ($_SERVER['HTTP_HOST']) {
$mydomains[] = $_SERVER['HTTP_HOST'];
}
var_dump(array_merge($domains, $mydomains));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment