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
This commit is contained in:
dd32 2010-12-08 11:04:40 +00:00
parent 1bc51e9c15
commit 5cce49e2b7
1 changed files with 2 additions and 2 deletions

View File

@ -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 ) {