mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Issue #91 - 404 headers on missing pages.
This commit is contained in:
@@ -325,14 +325,15 @@ class redirection
|
|||||||
|
|
||||||
public function redirect($url, $replace = TRUE, $http_response_code = NULL, $preventCache = true)
|
public function redirect($url, $replace = TRUE, $http_response_code = NULL, $preventCache = true)
|
||||||
{
|
{
|
||||||
return $this->go($url, $replace, $http_response_code, $preventCache);
|
$this->go($url, $replace, $http_response_code, $preventCache);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redirect to the given URI
|
* Redirect to the given URI
|
||||||
*
|
*
|
||||||
* @param string $url
|
* @param string $url or error code number. eg. 404 = Not Found.
|
||||||
* @param boolean $replace - default TRUE
|
* @param boolean $replace - default TRUE
|
||||||
* @param integer|null $http_response_code - default NULL
|
* @param integer|null $http_response_code - default NULL
|
||||||
* @param boolean $preventCache
|
* @param boolean $preventCache
|
||||||
@@ -342,12 +343,14 @@ class redirection
|
|||||||
{
|
{
|
||||||
$url = str_replace("&", "&", $url); // cleanup when using e_QUERY in $url;
|
$url = str_replace("&", "&", $url); // cleanup when using e_QUERY in $url;
|
||||||
|
|
||||||
if(defset('e_DEBUG') == 'redirect')
|
if(defset('e_DEBUG') === 'redirect')
|
||||||
{
|
{
|
||||||
$error = debug_backtrace();
|
$error = debug_backtrace();
|
||||||
|
|
||||||
e107::getLog()->addDebug("URL: ".$url."\nFile: ".$error[1]['file']."\nLine: ".$error[1]['line']."\nClass: ".$error[1]['class']."\nFunction: ".$error[1]['function']."\n\n");
|
e107::getLog()->addDebug("URL: ".$url."\nFile: ".$error[1]['file']."\nLine: ".$error[1]['line']."\nClass: ".$error[1]['class']."\nFunction: ".$error[1]['function']."\n\n");
|
||||||
e107::getLog()->toFile('redirect.log',true);
|
e107::getLog()->toFile('redirect.log',true);
|
||||||
|
echo "debug active";
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(session_id())
|
if(session_id())
|
||||||
|
Reference in New Issue
Block a user