From a4776498d311ec89d558b5916ea1e18aa180f1cf Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 11 Mar 2010 22:58:43 +0000 Subject: [PATCH] Don't check for the existence of index.php in the htaccess rewrite rules. props miqrogroove. see #11845 git-svn-id: http://svn.automattic.com/wordpress/trunk@13676 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network.php | 3 ++- wp-includes/rewrite.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/network.php b/wp-admin/network.php index 9fcfdf43f..78ed836e7 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -283,6 +283,7 @@ define( 'BLOG_ID_CURRENT_SITE', 1 ); // Construct an htaccess file. $htaccess_file = 'RewriteEngine On RewriteBase ' . $base . ' +RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^' . ( $vhost ? '([_0-9a-zA-Z-]+/)?' : '' ) . 'files/(.+) wp-includes/ms-files.php?file=$2 [L]' . "\n"; @@ -303,7 +304,7 @@ $htaccess_file .= "\nRewriteRule . index.php [L]"; ?>
  • .htaccess file in %s, replacing other WordPress rules:' ), ABSPATH ); ?>

    -
  • diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 8dc2af75e..579a13c62 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -1683,6 +1683,7 @@ class WP_Rewrite { $rules = "\n"; $rules .= "RewriteEngine On\n"; $rules .= "RewriteBase $home_root\n"; + $rules .= "RewriteRule ^index\.php$ - [L]"; // Prevent -f checks on index.php. //add in the rules that don't redirect to WP's index.php (and thus shouldn't be handled by WP at all) foreach ( (array) $this->non_wp_rules as $match => $query) {