Changeset 6058

Show
Ignore:
Timestamp:
09/07/07 02:43:00 (1 year ago)
Author:
markjaquith
Message:

Correctly set REQUEST_URI for IIS setups that put that info into SCRIPT_NAME as well as PATH_INFO. props snakefoot and Nazgul. fixes #4853

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-settings.php

    r6026 r6058  
    4141        if (empty($_SERVER['PATH_INFO'])) 
    4242            $_SERVER['REQUEST_URI'] = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')) . '/'; 
     43        elseif ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] ) 
     44            // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice) 
     45            $_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO']; 
    4346        else 
    4447            $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];