Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r17549 r17031  
    3636 */
    3737function 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 )
     38    global $wp_rewrite, $is_iis7, $wp_query, $wpdb;
     39
     40    if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || !empty($_POST) || is_preview() || is_robots() || ( $is_iis7 && !iis7_supports_permalinks() ) )
    4141        return;
    4242
     
    151151
    152152            $obj = $wp_query->get_queried_object();
    153             if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) ) && !is_wp_error($tax_url) && !empty($redirect['query']) ) {
     153            if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) ) && !is_wp_error($tax_url) ) {
    154154                if ( !empty($redirect['query']) ) {
    155155                    if ( is_category() ) {
     
    196196
    197197            $addl_path = '';
    198             if ( is_feed() && in_array( get_query_var('feed'), $wp_rewrite->feeds ) ) {
     198            if ( is_feed() ) {
    199199                $addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : '';
    200200                if ( get_query_var( 'withcomments' ) )
Note: See TracChangeset for help on using the changeset viewer.