WordPress.org

Make WordPress Core

Ticket #4732: 4732.diff

File 4732.diff, 511 bytes (added by Denis-de-Bernardy, 9 years ago)

anchor the regex + strip the port too

  • 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