WordPress.org

Make WordPress Core

Ticket #4732: 4732.2.diff

File 4732.2.diff, 512 bytes (added by Denis-de-Bernardy, 5 years ago)

anchor the regex + strip the port too + allow for 3 (?) slashes after the protocol

  • wp-settings.php

     
    8787                        $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; 
    8888                } 
    8989        } 
     90// see: http://core.trac.wordpress.org/ticket/4732 
     91} else { 
     92        $_SERVER['REQUEST_URI'] = preg_replace("|^https?://+[^/]+|i", $_SERVER['REQUEST_URI']); 
    9093} 
    9194 
    9295// Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests