WordPress.org

Make WordPress Core

Ticket #19607: 19607.network-redirect.patch

File 19607.network-redirect.patch, 593 bytes (added by ocean90, 2 years ago)
  • wp-includes/canonical.php

     
    528528                wp_redirect( site_url( 'wp-login.php', 'login' ) ); 
    529529                exit; 
    530530        } 
     531 
     532        $network = array( 
     533                home_url( 'network', 'relative' ), 
     534                site_url( 'network', 'relative' ), 
     535        ); 
     536        if ( in_array( untrailingslashit( $_SERVER['REQUEST_URI'] ), $network ) ) { 
     537                wp_redirect( network_admin_url() ); 
     538                exit; 
     539        } 
    531540} 
    532541 
    533542add_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );