Make WordPress Core

Changeset 9203


Ignore:
Timestamp:
10/16/2008 07:17:04 PM (17 years ago)
Author:
markjaquith
Message:

Strip trailing /index.php in Canonical, fixes #5017. fixes #7173.

File:
1 edited

Legend:

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

    r9197 r9203  
    5555
    5656    // Some PHP setups turn requests for / into /index.php in REQUEST_URI
    57     $original['path'] = preg_replace('|/index\.php$|', '/', $original['path']);
     57    // See: http://trac.wordpress.org/ticket/5017
     58    // See: http://trac.wordpress.org/ticket/7173
     59    // Disabled, for now:
     60    // $original['path'] = preg_replace('|/index\.php$|', '/', $original['path']);
    5861
    5962    $redirect = $original;
     
    178181        unset($redirect['port']);
    179182
    180     // trailing /index.php/
    181     $redirect['path'] = preg_replace('|/index.php/$|', '/', $redirect['path']);
     183    // trailing /index.php
     184    $redirect['path'] = preg_replace('|/index.php/*?$|', '/', $redirect['path']);
    182185
    183186    // Remove trailing spaces from the path
Note: See TracChangeset for help on using the changeset viewer.