diff -u b/core/lib/Drupal/Core/ExceptionController.php b/core/lib/Drupal/Core/ExceptionController.php --- b/core/lib/Drupal/Core/ExceptionController.php +++ b/core/lib/Drupal/Core/ExceptionController.php @@ -138,13 +138,13 @@ watchdog('page not found', check_plain($request->attributes->get('system_path')), NULL, WATCHDOG_WARNING); // Check for and return a fast 404 page if configured. - $config = config('system.performance')->get('fast_404'); + $config = config('system.performance'); - $exclude_paths = $config->get('exclude_paths'); - if ($config->get('enabled') && $exclude_paths && !preg_match($exclude_paths, $request->getPathInfo())) { - $fast_paths = $config->get('paths'); + $exclude_paths = $config->get('fast_404.exclude_paths'); + if ($config->get('fast_404.enabled') && $exclude_paths && !preg_match($exclude_paths, $request->getPathInfo())) { + $fast_paths = $config->get('fast_404.paths'); if ($fast_paths && preg_match($fast_paths, $request->getPathInfo())) { - $fast_404_html = $config->get('html'); + $fast_404_html = $config->get('fast_404.html'); $fast_404_html = strtr($fast_404_html, array('@path' => check_plain($request->getUri()))); return new Response($fast_404_html, 404); } only in patch2: unchanged: --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -587,19 +587,22 @@ * * The options below return a simple, fast 404 page for URLs matching a * specific pattern: - * - $conf['system.fast_404']['exclude_paths']: A regular expression to match paths to exclude, - * such as images generated by image styles, or dynamically-resized images. - * If you need to add more paths, you can add '|path' to the expression. - * - $conf['system.fast_404']['paths']: A regular expression to match paths that should return a - * simple 404 page, rather than the fully themed 404 page. If you don't have - * any aliases ending in htm or html you can add '|s?html?' to the expression. - * - $conf['system.fast_404']['html']: The html to return for simple 404 pages. + * - $conf['system.performance]['fast_404']['exclude_paths']: A regular + * expression to match paths to exclude, such as images generated by image + * styles, or dynamically-resized images. If you need to add more paths, you + * can add '|path' to the expression. + * - $conf['system.performance]['fast_404']['paths']: A regular expression to + * match paths that should return a simple 404 page, rather than the fully + * themed 404 page. If you don't have any aliases ending in htm or html you + * can add '|s?html?' to the expression. + * - $conf['system.performance]['fast_404']['html']: The html to return for + * simple 404 pages. * * Remove the leading hash signs if you would like to alter this functionality. */ -#$conf['system.fast_404']['exclude_paths'] = '/\/(?:styles)\//'; -#$conf['system.fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; -#$conf['system.fast_404']['html'] = '404 Not Found

Not Found

The requested URL "@path" was not found on this server.

'; +#$conf['system.performance]['fast_404']['exclude_paths'] = '/\/(?:styles)\//'; +#$conf['system.performance]['fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +#$conf['system.performance]['fast_404']['html'] = '404 Not Found

Not Found

The requested URL "@path" was not found on this server.

'; /** * Load local development override configuration, if available.