WordPress.org

Make WordPress Core

Changeset 6058


Ignore:
Timestamp:
09/07/07 02:43:00 (8 years 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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']; 
Note: See TracChangeset for help on using the changeset viewer.