2022-12-19 10:34:06 -06:00
|
|
|
<?php
|
|
|
|
|
$code = $_SERVER['REDIRECT_STATUS'];
|
2023-01-19 11:46:03 -06:00
|
|
|
$codes = array(
|
2022-12-19 10:34:06 -06:00
|
|
|
403 => 'Forbidden',
|
|
|
|
|
404 => '404 Not Found',
|
2023-01-19 11:46:03 -06:00
|
|
|
500 => 'Internal Server Error'
|
|
|
|
|
);
|
2022-12-19 10:34:06 -06:00
|
|
|
$source_url = 'http'.((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 's' : '').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
|
|
|
|
|
if (array_key_exists($code, $codes) && is_numeric($code)) {
|
2023-01-19 11:46:03 -06:00
|
|
|
die("Error $code: {$codes[$code]}");
|
2022-12-19 10:34:06 -06:00
|
|
|
} else {
|
2023-01-19 11:46:03 -06:00
|
|
|
die('Unknown error');
|
2022-12-19 10:34:06 -06:00
|
|
|
}
|
2023-01-19 11:46:03 -06:00
|
|
|
?>
|