Make WordPress Core

Changeset 21207


Ignore:
Timestamp:
07/05/2012 01:23:39 PM (11 years ago)
Author:
markjaquith
Message:

Reënable canonical redirects for IIS. Let's work out any remaining bugs in this cycle. fixes #20484. reverts [17492]. see #16639

File:
1 edited

Legend:

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

    r21112 r21207  
    1919 *
    2020 * Prevents redirection for feeds, trackbacks, searches, comment popup, and
    21  * admin URLs. Does not redirect on IIS, page/post previews, and on form data.
     21 * admin URLs. Does not redirect on non-pretty-permalink-supporting IIS 7,
     22 * page/post previews, WP admin, Trackbacks, robots.txt, searches, or on POST
     23 * requests.
    2224 *
    2325 * Will also attempt to find the correct link when a user enters a URL that does
     
    2729 * @since 2.3.0
    2830 * @uses $wp_rewrite
    29  * @uses $is_IIS
     31 * @uses $is_iis7
    3032 *
    3133 * @param string $requested_url Optional. The URL that was requested, used to
     
    3638 */
    3739function redirect_canonical( $requested_url = null, $do_redirect = true ) {
    38     global $wp_rewrite, $is_IIS, $wp_query, $wpdb;
    39 
    40     if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || !empty($_POST) || is_preview() || is_robots() || $is_IIS )
     40    global $wp_rewrite, $is_iis7, $wp_query, $wpdb;
     41
     42    if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || !empty($_POST) || is_preview() || is_robots() || ( $is_iis7 && !iis7_supports_permalinks() ) )
    4143        return;
    4244
Note: See TracChangeset for help on using the changeset viewer.