Commit b88d9a6a authored by Kevin Ditscheid's avatar Kevin Ditscheid

Merge branch 'feature_detectHtaccessConflict' into 'master'

[FEATURE] Detect htaccess conflicts in pageNotFoundHandling

See merge request !3
parents a7f241d7 015514da
......@@ -342,9 +342,17 @@ class RoutingService {
// this can happen if e.g. the wanted error page can't be fetched.
header($GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_statheader']);
$htaccessMessage = '';
if(
$exception->getPrevious() instanceof \RuntimeException &&
\strpos($exception->getPrevious()->getMessage(), '401 Unauthorized')!==FALSE
) {
$htaccessMessage = ' The error page reported 401 Unauthorized, maybe there is a htaccess protection on it.';
}
echo GeneralUtility::makeInstance(ErrorPageController::class)->errorAction(
'Page Not Found',
'Reason: ' . $exception->getMessage()
'Reason: ' . $exception->getMessage() . $htaccessMessage
);
die();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment