WordPress.org

Make WordPress Core

Ticket #12136: 12136.2.diff

File 12136.2.diff, 921 bytes (added by nacin, 4 years ago)

Includes an optimization from Denis-de-Debernardy from #12497

  • network.php

     
    286286RewriteBase ' . $base . ' 
    287287 
    288288# uploaded files 
    289 RewriteRule ^(.*/)?files/$ index.php [L] 
    290 RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* 
    291 RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L] 
     289RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] 
    292290 
    293291# add a trailing slash to /wp-admin 
    294 RewriteCond %{REQUEST_URI} ^.*/wp-admin$ 
    295 RewriteRule ^(.+)$ $1/ [R=301,L] 
     292RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] 
    296293 
    297294RewriteCond %{REQUEST_FILENAME} -f [OR] 
    298295RewriteCond %{REQUEST_FILENAME} -d 
    299 RewriteRule . - [L] 
     296RewriteRule ^ - [L] 
    300297RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] 
    301298RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] 
    302299RewriteRule . index.php [L]';