Created
November 11, 2020 17:58
-
-
Save careydayrit/ff2a543eba3de11a419b177145faa7a8 to your computer and use it in GitHub Desktop.
Redirect
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
<?php | |
if (($_SERVER['REQUEST_URI'] == '/2016annualreport') && (php_sapi_name() != "cli")) { | |
header('HTTP/1.0 301 Moved Permanently'); | |
header('Location: https://'. $_SERVER['HTTP_HOST'] . '/2016annualreport/index.html'); | |
// Name transaction "redirect" in New Relic for improved reporting (optional). | |
if (extension_loaded('newrelic')) { | |
newrelic_name_transaction("redirect"); | |
} | |
exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment