Ticket #11884: wordpress.16670.patch
| File wordpress.16670.patch, 1.3 KB (added by g1smd, 2 years ago) |
|---|
-
wp-includes/rewrite.php
1644 1644 $this->matches = ''; 1645 1645 $rewrite = $this->rewrite_rules(); 1646 1646 $num_rules = count($rewrite); 1647 $rules .= "RewriteCond %{REQUEST_FILENAME} -f [OR]\n" . 1647 $rules .= "RewriteCond $1 ^(index\.php)?$ [OR]\n" . 1648 "RewriteCond $1 \.(gif|jpe?g|png|ico|css|js)$ [OR]\n" . 1649 "RewriteCond %{REQUEST_FILENAME} -f [OR]\n" . 1648 1650 "RewriteCond %{REQUEST_FILENAME} -d\n" . 1649 "RewriteRule ^.*$- [S=$num_rules]\n";1651 "RewriteRule (.*) - [S=$num_rules]\n"; 1650 1652 1651 1653 foreach ( (array) $rewrite as $match => $query) { 1652 1654 // Apache 1.3 does not support the reluctant (non-greedy) modifier. … … 1664 1666 $rules .= 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA,L]\n"; 1665 1667 } 1666 1668 } else { 1667 $rules .= "RewriteCond %{REQUEST_FILENAME} !-f\n" . 1669 $rules .= "RewriteCond $1 !^(index\.php)?$\n" . 1670 "RewriteCond $1 !\.(gif|jpe?g|png|ico|css|js)$\n" . 1671 "RewriteCond %{REQUEST_FILENAME} !-f\n" . 1668 1672 "RewriteCond %{REQUEST_FILENAME} !-d\n" . 1669 "RewriteRule .{$home_root}{$this->index} [L]\n";1673 "RewriteRule (.+) {$home_root}{$this->index} [L]\n"; 1670 1674 } 1671 1675 1672 1676 $rules .= "</IfModule>\n";
