From 0e84a66e4990189eab31dbcc625f6446a3320437 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 3 Mar 2011 15:55:24 +0000 Subject: [PATCH] Do not do canonical redirects for unregistered feeds. fixes #16704 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@17498 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/canonical.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index ff8a495dd4..2c313e5a8d 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -195,7 +195,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) { } $addl_path = ''; - if ( is_feed() ) { + if ( is_feed() && in_array( get_query_var('feed'), $wp_rewrite->feeds ) ) { $addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : ''; if ( get_query_var( 'withcomments' ) ) $addl_path .= 'comments/';