1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

Issue #91 - 404 headers on missing pages.

This commit is contained in:
Cameron
2015-02-05 20:25:28 -08:00
parent b7cb8fe75d
commit 7b1368b276
2 changed files with 9 additions and 5 deletions

View File

@@ -325,14 +325,15 @@ class redirection
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
*
* @param string $url
* @param string $url or error code number. eg. 404 = Not Found.
* @param boolean $replace - default TRUE
* @param integer|null $http_response_code - default NULL
* @param boolean $preventCache
@@ -341,13 +342,15 @@ class redirection
public function go($url, $replace = TRUE, $http_response_code = NULL, $preventCache = true)
{
$url = str_replace("&", "&", $url); // cleanup when using e_QUERY in $url;
if(defset('e_DEBUG') == 'redirect')
if(defset('e_DEBUG') === 'redirect')
{
$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()->toFile('redirect.log',true);
echo "debug active";
return;
}
if(session_id())

View File

@@ -539,7 +539,8 @@ class pageClass
if(!$sql->gen($query))
{
header("HTTP/1.0 404 Not Found");
// exit;
/*
$ret['title'] = LAN_PAGE_12; // ***** CHANGED