WordPress.org

Make WordPress Core

Ticket #7892: canonical.php.patch

File canonical.php.patch, 639 bytes (added by ah125i, 6 years ago)

patch for issue

  • canonical.php

     
    213213        } 
    214214 
    215215        // Always trailing slash the 'home' URL 
    216         if ( $redirect['path'] == $user_home['path'] ) 
     216        if ( $redirect['path'] == $user_home['path'] )  
    217217                $redirect['path'] = trailingslashit($redirect['path']); 
     218    else if ( is_front_page() && empty($redirect['path']) )  
     219                $redirect['path'] = '/'; 
    218220 
    219221        // Ignore differences in host capitalization, as this can lead to infinite redirects 
    220222        if ( strtolower($original['host']) == strtolower($redirect['host']) )