Change record status: 
Project: 
Introduced in branch: 
7.x
Introduced in version: 
7.9
Description: 

404s for images, css files, js files, and other static resources have caused performance problems on Drupal sites in the past. Drupal now handles static resources defined by the '404_fast_paths' configuration variable with a much faster 404 page, bypassing normal Drupal page rendering. If you uncomment drupal_fast_404() inside the updated settings.php file, Drupal will bypass any extraneous functionality if it encounters a missing static file that is not in one of the excluded paths as defined by the '404_fast_paths_exclude' configuration variable. This will speed up 404s even more quickly by not writing them to the Drupal log, and not rendering anything besides a very simple 404 page (which is usually not displayed for missing images anyways).

Further documentation of settings and configuration variables can be found in the 'Fast 404 pages:' section of the settings.php file.

Please note that this patch is only needed if you rely on the default .htaccess file, thus making index.php your 404 handler. If you are serving the static files either through a reverse proxy, or in any other way using a specific location for them in your web server configuration then there's no need whatsoever for you to patch anything. If you don't know what this means then you should apply the patch.

Impacts: 
Site builders, administrators, editors
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Not done

Comments

404s for images, css files, js files, and other static resources have caused performance problems on Drupal sites in the past. Drupal now handles static resources defined by the '404_fast_paths' configuration variable with a much faster 404 page, bypassing normal Drupal page rendering. If you uncomment drupal_fast_404() inside the updated settings.php file, Drupal will bypass any extraneous functionality if it encounters a missing static file that is not in one of the excluded paths as defined by the '404_fast_paths_exclude' configuration variable. This will speed up 404s even more quickly by not writing them to the Drupal log, and not rendering anything besides a very simple 404 page (which is usually not displayed for missing images anyways).

Further documentation of settings and configuration variables can be found in the 'Fast 404 pages:' section of the settings.php file.

Please note that this patch is only needed if you rely on the default .htaccess file, thus making index.php your 404 handler. If you are serving the static files either through a reverse proxy or in any other way using a specific location for them in your web server configuration then there's no need whatsoever for you to patch anything. If you don't know what this means then you should apply the patch.

António