Make WordPress Core

Changeset 6143


Ignore:
Timestamp:
09/20/2007 08:25:43 PM (19 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

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