Index: .htaccess
===================================================================
RCS file: /cvs/drupal/drupal/.htaccess,v
retrieving revision 1.75
diff -u -F^f -r1.75 .htaccess
--- .htaccess	14 Jul 2006 01:03:28 -0000	1.75
+++ .htaccess	23 Aug 2006 02:59:23 -0000
@@ -8,6 +8,13 @@
   Deny from all
 </FilesMatch>
 
+# This overrides the Drupal 404 handler for files that should never be handled by Drupal
+# Use this line if you want to exclude .shmtl and .html as well.
+#<FilesMatch "\.(png|gif|s?html|jpe?g|css|js|cgi|ico|swf|flv)$">
+<FilesMatch "\.(png|gif|shtml|jpe?g|css|js|cgi|ico|swf|flv)$">
+  ErrorDocument 404 default
+</FilesMatch>
+
 # Don't show directory listings for URLs which map to a directory.
 Options -Indexes
 
@@ -83,6 +90,10 @@
   #RewriteRule module.php index.php?q=%1 [L]
 
   # Rewrite current-style URLs of the form 'index.php?q=x'.
+
+  # Use this if you want to exclude .shmtl and .html as well.
+  #RewriteCond %{REQUEST_FILENAME} !\.(png|gif|s?html|jpe?g|css|js|cgi|ico|swf|flv)$
+  RewriteCond %{REQUEST_FILENAME} !\.(png|gif|shtml|jpe?g|css|js|cgi|ico|swf|flv)$
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.560
diff -u -F^f -r1.560 common.inc
--- includes/common.inc	22 Aug 2006 11:13:03 -0000	1.560
+++ includes/common.inc	23 Aug 2006 02:59:24 -0000
@@ -305,7 +305,8 @@ function drupal_not_found() {
   if (empty($return)) {
     drupal_set_title(t('Page not found'));
   }
-  print theme('page', $return);
+  // To conserve CPU and bandwidth, omit the blocks
+  print theme('page', $return, FALSE);
 }
 
 /**
Index: themes/chameleon/chameleon.theme
===================================================================
RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v
retrieving revision 1.48
diff -u -F^f -r1.48 chameleon.theme
--- themes/chameleon/chameleon.theme	22 Aug 2006 09:00:31 -0000	1.48
+++ themes/chameleon/chameleon.theme	23 Aug 2006 02:59:25 -0000
@@ -3,7 +3,7 @@
 
 /**
  * @file
- * A slim, CSS-driven theme.
+ * A slim, CSS-driven theme which does not depend on a template engine like phptemplate
  */
 
 function chameleon_features() {
@@ -21,7 +21,7 @@ function chameleon_regions() {
   );
 }
 
-function chameleon_page($content) {
+function chameleon_page($content, $show_blocks = TRUE) {
   $language = $GLOBALS['locale'];
 
   if (theme_get_setting('toggle_favicon')) {
@@ -71,8 +71,10 @@ function chameleon_page($content) {
   $output .= " <table id=\"content\">\n";
   $output .= "  <tr>\n";
 
-  if ($blocks = theme_blocks("left")) {
-    $output .= "   <td id=\"sidebar-left\">$blocks</td>\n";
+  if ($show_blocks) {
+    if ($blocks = theme_blocks("left")) {
+      $output .= "   <td id=\"sidebar-left\">$blocks</td>\n";
+    }
   }
 
   $output .= "   <td id=\"main\">\n";
@@ -100,8 +102,10 @@ function chameleon_page($content) {
 
   $output  .= "   </td>\n";
 
-  if ($blocks = theme_blocks("right")) {
-    $output .= "   <td id=\"sidebar-right\">$blocks</td>\n";
+  if ($show_blocks) {
+    if ($blocks = theme_blocks("right")) {
+      $output .= "   <td id=\"sidebar-right\">$blocks</td>\n";
+    }
   }
 
   $output .= "  </tr>\n";
Index: themes/engines/phptemplate/phptemplate.engine
===================================================================
RCS file: /cvs/drupal/drupal/themes/engines/phptemplate/phptemplate.engine,v
retrieving revision 1.44
diff -u -F^f -r1.44 phptemplate.engine
--- themes/engines/phptemplate/phptemplate.engine	22 Aug 2006 09:00:31 -0000	1.44
+++ themes/engines/phptemplate/phptemplate.engine	23 Aug 2006 02:59:25 -0000
@@ -147,7 +147,7 @@ function phptemplate_features() {
  * generate a series of page template files suggestions based on the
  * current path. If none are found, the default page.tpl.php is used.
  */
-function phptemplate_page($content) {
+function phptemplate_page($content, $show_blocks = TRUE) {
 
   /* Set title and breadcrumb to declared values */
   if (drupal_is_front_page()) {
@@ -162,23 +162,27 @@ function phptemplate_page($content) {
   /**
   * Populate sidebars.
   */
-  $layout = 'none';
-  global $sidebar_indicator;
-  /**
-   * Sidebar_indicator tells the block counting code to count sidebars separately.
-   */
-  $sidebar_indicator = 'left';
-  $sidebar_left = theme('blocks', 'left');
-  if ($sidebar_left != '') {
-    $layout = 'left';
-  }
+  if ($show_blocks) {
+    global $sidebar_indicator;
+    /**
+     * Sidebar_indicator tells the block counting code to count sidebars separately.
+     */
+    $sidebar_indicator = 'left';
+    $sidebar_left = theme('blocks', 'left');
+    if ($sidebar_left != '') {
+      $layout = 'left';
+    }
 
-  $sidebar_indicator = 'right';
-  $sidebar_right = theme('blocks', 'right');
-  if ($sidebar_right != '') {
-    $layout = ($layout == 'left') ? 'both' : 'right';
+    $sidebar_indicator = 'right';
+    $sidebar_right = theme('blocks', 'right');
+    if ($sidebar_right != '') {
+      $layout = ($layout == 'left') ? 'both' : 'right';
+    }
+    $sidebar_indicator = NULL;
+  }
+  else {
+   $layout = 'none';
   }
-  $sidebar_indicator = NULL;
 
   // Construct page title
   if (drupal_get_title()) {
