Enable canonical redirections for Permalink suporting IIS. Props peaceablewhale See #10187

git-svn-id: https://develop.svn.wordpress.org/trunk@16797 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-12-08 11:04:40 +00:00
parent d81779a74d
commit 5c50656b6a
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 ) {