WordPress.org

Make WordPress Core

Ticket #5661: rewrite_match.diff

File rewrite_match.diff, 533 bytes (added by filosofo, 7 years ago)
  • wp-includes/rewrite.php

     
    127127        foreach ($rewrite as $match => $query) { 
    128128                // If the requesting file is the anchor of the match, prepend it 
    129129                // to the path info. 
    130                 if ( (! empty($url)) && (strpos($match, $url) === 0) ) { 
     130                if ( (! empty($url)) && (strpos($match, $url) === 0) && ($url != $request)) { 
    131131                        $request_match = $url . '/' . $request; 
    132132                } 
    133133