router error reporting
This commit is contained in:
parent
0a6916e1b9
commit
8029f56d1c
@ -137,15 +137,21 @@ class Router {
|
|||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
logger("Module {$module} not found.", LOGGER_DEBUG, LOG_WARNING);
|
if((x($_SERVER, 'QUERY_STRING'))
|
||||||
|
&& ($_SERVER['QUERY_STRING'] === 'q=internal_error.html')
|
||||||
if((x($_SERVER, 'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && \App::$config['system']['dreamhost_error_hack']) {
|
&& \App::$config['system']['dreamhost_error_hack']) {
|
||||||
logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']);
|
logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI'],LOGGER_DEBUG);
|
||||||
goaway(z_root() . $_SERVER['REQUEST_URI']);
|
goaway(z_root() . $_SERVER['REQUEST_URI']);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], LOGGER_DEBUG);
|
if(get_config('system','log_404',true)) {
|
||||||
header($_SERVER['SERVER_PROTOCOL'] . ' 404 ' . t('Not Found'));
|
logger("Module {$module} not found.", LOGGER_DEBUG, LOG_WARNING);
|
||||||
|
logger('index.php: page not found: ' . $_SERVER['REQUEST_URI']
|
||||||
|
. ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: '
|
||||||
|
. $_SERVER['QUERY_STRING'], LOGGER_DEBUG);
|
||||||
|
}
|
||||||
|
|
||||||
|
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
|
||||||
$tpl = get_markup_template('404.tpl');
|
$tpl = get_markup_template('404.tpl');
|
||||||
\App::$page['content'] = replace_macros($tpl, array(
|
\App::$page['content'] = replace_macros($tpl, array(
|
||||||
'$message' => t('Page not found.')
|
'$message' => t('Page not found.')
|
||||||
|
Reference in New Issue
Block a user