From 5cce49e2b75b193b371d4510645a725c540a8675 Mon Sep 17 00:00:00 2001 From: dd32 Date: Wed, 8 Dec 2010 11:04:40 +0000 Subject: [PATCH] Enable canonical redirections for Permalink suporting IIS. Props peaceablewhale See #10187 git-svn-id: http://svn.automattic.com/wordpress/trunk@16797 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/canonical.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index ff36937914..978d988ba5 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -34,10 +34,10 @@ * @return null|false|string Null, if redirect not needed. False, if redirect * not needed or the string of the URL */ -function redirect_canonical($requested_url=null, $do_redirect=true) { +function redirect_canonical( $requested_url = null, $do_redirect = true ) { global $wp_rewrite, $is_IIS, $wp_query, $wpdb; - if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || $is_IIS || ( isset($_POST) && count($_POST) ) || is_preview() || is_robots() ) + if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || !empty($_POST) || is_preview() || is_robots() || ( $is_IIS && !iis7_supports_permalinks() ) ) return; if ( !$requested_url ) {