Index: .htaccess =================================================================== RCS file: /cvs/drupal/drupal/.htaccess,v retrieving revision 1.85 diff -u -F^f -r1.85 .htaccess --- .htaccess 18 May 2007 22:09:45 -0000 1.85 +++ .htaccess 14 Jun 2007 01:52:21 -0000 @@ -7,6 +7,19 @@ Order allow,deny +# The following line prevents Drupal from handling 404 errors for some +# flat files. The idea is to avoid the performance cost of doing +# a full bootstrap. +# +# Uncomment the following 3 lines to save server and bandwidth resources. +# You must uncomment the corresponding the RewriteCond line later in this +# file as well as those in settings.php +# +# +# ErrorDocument 404 default +# +# + # Don't show directory listings for URLs which map to a directory. Options -Indexes @@ -86,6 +99,13 @@ # the rewrite rules are not working properly. #RewriteBase /drupal + # Uncomment the following line to save server and bandwidth resources. + # You must uncomment the corresponding the RewriteCond line later in this + # You must uncomment the corresponding FilesMatch line earlier in this file + # as well as those in settings.php + # + # RewriteCond %{REQUEST_URI} !\.(png|gif|s?html|jpe?g|css|js|cgi|ico|swf|flv)$ + # Rewrite URLs of the form 'index.php?q=x'. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d Index: sites/default/default.settings.php =================================================================== RCS file: /cvs/drupal/drupal/sites/default/default.settings.php,v retrieving revision 1.1 diff -u -F^f -r1.1 default.settings.php --- sites/default/default.settings.php 8 May 2007 16:36:55 -0000 1.1 +++ sites/default/default.settings.php 14 Jun 2007 01:52:21 -0000 @@ -136,6 +136,22 @@ ini_set('session.use_trans_sid', 0); ini_set('url_rewriter.tags', ''); + +/** + * The following line prevents Drupal from handling 404 errors for some + * flat files. The idea is to avoid the performance cost of doing + * a full bootstrap. + * + * Uncomment the following 4 lines to save server and bandwidth resources. + * You must uncomment the corresponding RewriteCond and FilesMatch lines + * in .htaccess as well + */ + +//if (preg_match("/\.(png|gif|s?html|jpe?g|css|js|cgi|ico|swf|flv)$/", $_SERVER['QUERY_STRING'])) { +// header('HTTP/1.0 404 Not Found'); +// exit(); +//} + /** * Drupal automatically generates a unique session cookie name for each site * based on on its full domain name. If you have multiple domains pointing at