Changeset 6143

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

Remove trailing /index.php fixing from canonical.php ... Thanks chaoticmortalcom. fixes #5017

Files:

Legend:

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

    r6118 r6143  
    1818    if ( false === $original ) 
    1919        return; 
     20 
     21    // Some PHP setups turn requests for / into /index.php in REQUEST_URI 
     22    $original['path'] = preg_replace('|/index\.php$|', '/', $original['path']); 
    2023 
    2124    $redirect = $original; 
     
    112115        unset($redirect['port']); 
    113116 
    114     // trailing /index.php or /index.php
    115     $redirect['path'] = preg_replace('|/index.php/?$|', '/', $redirect['path']); 
     117    // trailing /index.php
     118    $redirect['path'] = preg_replace('|/index.php/$|', '/', $redirect['path']); 
    116119 
    117120    // strip /index.php/ when we're not using PATHINFO permalinks