WordPress.org

Make WordPress Core

Changeset 14914


Ignore:
Timestamp:
05/25/2010 11:55:32 PM (8 years ago)
Author:
wpmuguru
Message:

apache rewrite rule cleanup, props filosofo, fixes #13540

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/network.php

    r14884 r14914  
    434434        // Construct an htaccess file.
    435435        $htaccess_file = 'RewriteEngine On
    436                 RewriteBase ' . $base . '
    437                 RewriteRule ^index\.php$ - [L]
    438                
    439                 # uploaded files
    440                 RewriteRule ^' . ( $subdomain_install ? '' : '([_0-9a-zA-Z-]+/)?' ) . 'files/(.+) wp-includes/ms-files.php?file=$' . ( $subdomain_install ? 1 : 2 ) . ' [L]' . "\n";
     436RewriteBase ' . $base . '
     437RewriteRule ^index\.php$ - [L]
     438
     439# uploaded files
     440RewriteRule ^' . ( $subdomain_install ? '' : '([_0-9a-zA-Z-]+/)?' ) . 'files/(.+) wp-includes/ms-files.php?file=$' . ( $subdomain_install ? 1 : 2 ) . ' [L]' . "\n";
    441441       
    442442        if ( ! $subdomain_install )
     
    444444       
    445445        $htaccess_file .= "\n" . 'RewriteCond %{REQUEST_FILENAME} -f [OR]
    446                 RewriteCond %{REQUEST_FILENAME} -d
    447                 RewriteRule ^ - [L]';
     446RewriteCond %{REQUEST_FILENAME} -d
     447RewriteRule ^ - [L]';
    448448       
    449449        // @todo custom content dir.
    450450        if ( ! $subdomain_install )
    451             $htaccess_file .= "\n" . 'RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    452                     RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]';
     451            $htaccess_file .= "\nRewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]\nRewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]";
    453452       
    454453        $htaccess_file .= "\nRewriteRule . index.php [L]";
     
    456455        ?>
    457456        <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH ); ?></p>
    458         <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $subdomain_install ? 11 : 16; ?>">
    459         <?php echo wp_htmledit_pre( $htaccess_file ); ?>
     457        <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $subdomain_install ? 11 : 16; ?>"><?php
     458        echo wp_htmledit_pre( $htaccess_file );
     459        ?>
    460460        </textarea></li>
    461461        </ol>
Note: See TracChangeset for help on using the changeset viewer.