--- .htaccess 2008/02/21 19:45:47 1.91 +++ .htaccess 2008/04/22 21:46:03 @@ -16,6 +16,18 @@ # Customized error messages. ErrorDocument 404 /index.php +# The following lines prevents Drupal from handling 404 errors for certain +# types of static files, such as images and css. +# +# This can help reduce the server's load because 404s for such files do not +# cause a full Drupal bootstrap. +# +# You must uncomment the corresponding RewriteCond and RewriteRule lines later in this file. +# + + ErrorDocument 404 "404 Not Found

Not Found

The requested URL was not found on this server.

+
+ # Set the default handler. DirectoryIndex index.php @@ -73,6 +85,20 @@ # If your site is running in a VirtualDocumentRoot at http://example.com/, # uncomment the following line: # RewriteBase / + + # The following lines prevents Drupal from handling 404 errors for certain + # types of static files, such as images and css. + # + # This can help reduce the server's load because 404s for such files do not + # cause a full Drupal bootstrap. + # + # You must uncomment the corresponding FilesMatch lines earlier in this file. + # + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_URI} !^/files/ + RewriteCond %{REQUEST_URI} \.(png|gif|jpe?g|s?html?|css|js|cgi|ico|swf|flv|dll)$ + RewriteCond %{REQUEST_URI} !^404.%1$ + RewriteRule ^(.*)$ 404.%1 [L] # Rewrite URLs of the form 'index.php?q=x'. RewriteCond %{REQUEST_FILENAME} !-f