Created
August 5, 2015 12:44
-
-
Save mcjwsk/a596bf8f6ecf440bec37 to your computer and use it in GitHub Desktop.
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
/** | |
* Rewrite environment variables with REDIRECT_ prefix. | |
*/ | |
foreach ($_SERVER as $env => $value) { | |
$left = substr($env, 0, 9); | |
$env = ltrim($env, $left); | |
if ($left == 'REDIRECT_' && !isset($_SERVER[$env])) { | |
$_SERVER[$env] = $value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment