Last active
February 23, 2016 20:41
-
-
Save avantegarde/2f682c7da66c1c756590 to your computer and use it in GitHub Desktop.
Redirect and match ALL urls to new domain
This file contains hidden or 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
<?php | |
// Redirect ALL urls to another domain | |
if (isset($_SERVER['PANTHEON_ENVIRONMENT']) && | |
($_SERVER['PANTHEON_ENVIRONMENT'] === 'live') && | |
(php_sapi_name() != "cli")) { | |
$newurl = 'http://www.jfrohrbaugh.com/'. $_SERVER['REQUEST_URI']; | |
header('HTTP/1.0 301 Moved Permanently'); | |
header("Location: $newurl"); | |
exit(); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment