Index: .htaccess
===================================================================
RCS file: /cvs/drupal/drupal/.htaccess,v
retrieving revision 1.90
diff -u -p -r1.90 .htaccess
--- .htaccess	5 Oct 2007 14:43:23 -0000	1.90
+++ .htaccess	5 Feb 2008 03:11:47 -0000
@@ -1,9 +1,11 @@
+# $Id: .htaccess,v 1.90 2007/10/05 14:43:23 dries Exp $
+
 #
 # Apache/PHP/Drupal settings:
 #
 
 # Protect files and directories from prying eyes.
-<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
+<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(CHANGELOG\.txt|COPYRIGHT\.txt|INSTALL\.txt|LICENSE\.txt|MAINTAINERS\.txt|UPGRADE\.txt|README\.txt|code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
   Order allow,deny
 </FilesMatch>
 
@@ -15,6 +17,7 @@ Options +FollowSymLinks
 
 # Customized error messages.
 ErrorDocument 404 /index.php
+ErrorDocument 403 /index.php
 
 # Set the default handler.
 DirectoryIndex index.php
@@ -75,14 +78,14 @@ DirectoryIndex index.php
   # To redirect all users to access the site WITH the 'www.' prefix,
   # (http://example.com/... will be redirected to http://www.example.com/...)
   # adapt and uncomment the following:
-  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
-  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
+  # RewriteCond %{HTTP_HOST} ^example\.com$ [nocase]
+  # RewriteRule ^(.*)$ http://www.example.com/$1 [last,redirect=301]
   #
   # To redirect all users to access the site WITHOUT the 'www.' prefix,
   # (http://www.example.com/... will be redirected to http://example.com/...)
   # uncomment and adapt the following:
-  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
-  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
+  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [nocase]
+  # RewriteRule ^(.*)$ http://example.com/$1 [last,redirect=301]
 
   # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
   # VirtualDocumentRoot and the rewrite rules are not working properly.
@@ -97,7 +100,5 @@ DirectoryIndex index.php
   # Rewrite URLs of the form 'index.php?q=x'.
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
-  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
+  RewriteRule ^(.*)$ index.php?q=$1 [last,qsappend]
 </IfModule>
-
-# $Id: .htaccess,v 1.90 2007/10/05 14:43:23 dries Exp $
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.585
diff -u -p -r1.585 system.module
--- modules/system/system.module	4 Feb 2008 12:07:23 -0000	1.585
+++ modules/system/system.module	5 Feb 2008 03:11:48 -0000
@@ -532,6 +532,11 @@ function system_init() {
   drupal_add_css(drupal_get_path('module', 'system') .'/defaults.css', 'module');
   drupal_add_css(drupal_get_path('module', 'system') .'/system.css', 'module');
   drupal_add_css(drupal_get_path('module', 'system') .'/system-menus.css', 'module');
+
+  if ($_SERVER['REDIRECT_STATUS'] == 403) {
+    drupal_access_denied();
+    exit;
+  }
 }
 
 /**
