Don't check for the existence of index.php in the htaccess rewrite rules. props miqrogroove. see #11845
git-svn-id: https://develop.svn.wordpress.org/trunk@13676 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0d3634ecbd
commit
403bf947e1
@ -283,6 +283,7 @@ define( 'BLOG_ID_CURRENT_SITE', 1 );</textarea>
|
||||
// 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]";
|
||||
|
||||
?>
|
||||
<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 ); ?>
|
||||
</textarea></li>
|
||||
</ol>
|
||||
|
@ -1683,6 +1683,7 @@ class WP_Rewrite {
|
||||
$rules = "<IfModule mod_rewrite.c>\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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user