Changeset 2047

Show
Ignore:
Timestamp:
01/05/05 02:06:16 (4 years ago)
Author:
saxmatt
Message:

Sometimes PATH_INFO is in there anyway, so this gives us SCRIPT_NAME without relying on mod_rewrite, should be cross-platform.

Files:

Legend:

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

    r2024 r2047  
    1111 
    1212// If someone has moved WordPress let's try to detect it 
     13if ( isset( $_SERVER['PATH_INFO'] ) ) 
     14    $_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] ); 
     15 
    1316if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') ) 
    1417    update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );