Last active
June 28, 2017 22:27
-
-
Save suzannealdrich/6443832 to your computer and use it in GitHub Desktop.
Pantheon site environment base URL logic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (isset($_SERVER['PANTHEON_ENVIRONMENT'])) { | |
switch ($_SERVER['PANTHEON_ENVIRONMENT']) { | |
case 'test': | |
$base_url = 'http://test-example.gotpantheon.com'; // NO trailing slash! | |
break; | |
case 'dev': | |
$base_url = 'http://dev-example.gotpantheon.com'; // NO trailing slash! | |
break; | |
case 'live': | |
$base_url = 'http://www.example.com'; // NO trailing slash! | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment