Skip to content

Instantly share code, notes, and snippets.

@lehelmatyus
Created February 2, 2017 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lehelmatyus/4725b2ded357273a5802c13327ee6e80 to your computer and use it in GitHub Desktop.
Save lehelmatyus/4725b2ded357273a5802c13327ee6e80 to your computer and use it in GitHub Desktop.
wp-config.php
if (isset($_SERVER['PANTHEON_ENVIRONMENT']) &&
$_SERVER['PANTHEON_ENVIRONMENT'] === 'live') {
if ($_SERVER['HTTP_HOST'] == 'lehelmatyus.com' ||
$_SERVER['HTTP_HOST'] == 'live-lehelmatyus.gotpantheon.com') {
header('HTTP/1.0 301 Moved Permanently');
header('Location: http://www.lehelmatyus.com'. $_SERVER['REQUEST_URI']);
exit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment