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
This commit is contained in:
parent
561e044ab2
commit
a4776498d3
|
@ -283,6 +283,7 @@ define( 'BLOG_ID_CURRENT_SITE', 1 );</textarea>
|
||||||
// Construct an htaccess file.
|
// Construct an htaccess file.
|
||||||
$htaccess_file = 'RewriteEngine On
|
$htaccess_file = 'RewriteEngine On
|
||||||
RewriteBase ' . $base . '
|
RewriteBase ' . $base . '
|
||||||
|
RewriteRule ^index\.php$ - [L]
|
||||||
|
|
||||||
# uploaded files
|
# uploaded files
|
||||||
RewriteRule ^' . ( $vhost ? '([_0-9a-zA-Z-]+/)?' : '' ) . 'files/(.+) wp-includes/ms-files.php?file=$2 [L]' . "\n";
|
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]";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH ); ?></p>
|
<li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH ); ?></p>
|
||||||
<textarea class="code" readonly="readonly" cols="100" rows="<?php echo $vhost ? 10 : 15; ?>">
|
<textarea class="code" readonly="readonly" cols="100" rows="<?php echo $vhost ? 11 : 16; ?>">
|
||||||
<?php echo wp_htmledit_pre( $htaccess_file ); ?>
|
<?php echo wp_htmledit_pre( $htaccess_file ); ?>
|
||||||
</textarea></li>
|
</textarea></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
|
@ -1683,6 +1683,7 @@ class WP_Rewrite {
|
||||||
$rules = "<IfModule mod_rewrite.c>\n";
|
$rules = "<IfModule mod_rewrite.c>\n";
|
||||||
$rules .= "RewriteEngine On\n";
|
$rules .= "RewriteEngine On\n";
|
||||||
$rules .= "RewriteBase $home_root\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)
|
//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) {
|
foreach ( (array) $this->non_wp_rules as $match => $query) {
|
||||||
|
|
Loading…
Reference in New Issue