Created
July 20, 2010 05:21
-
-
Save mjc/482565 to your computer and use it in GitHub Desktop.
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
function tep_redirect($url) { | |
if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) { | |
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false)); | |
} | |
if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page | |
if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url | |
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL | |
} | |
} | |
try { | |
throw new Exception("Foo"); | |
} catch(Exception $e) { | |
echo "<pre>";var_dump($e->getTrace()); echo "</pre>"; | |
} | |
// header('Location: ' . $url); | |
tep_exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment