Permalink
Browse files

Canonical redirect to correct location if rss2 is not default feed. w…

…p-feed.php redirection to default feed type instad of rss2. Props solarissmoke. Fixes #13047

git-svn-id: http://svn.automattic.com/wordpress/trunk@14162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 1e3b849 commit cafb51263a5a0fc64493504c8a93c7e9809b228d dd32 committed Apr 19, 2010
Showing with 3 additions and 3 deletions.
  1. +2 −2 wp-feed.php
  2. +1 −1 wp-includes/canonical.php
View
@@ -1,12 +1,12 @@
<?php
/**
- * Redirects to the RSS2 feed
+ * Redirects to the default feed
* This file is deprecated and only exists for backwards compatibility
*
* @package WordPress
*/
require( './wp-load.php' );
-wp_redirect( get_bloginfo( 'rss2_url' ), 301 );
+wp_redirect( get_bloginfo( get_default_feed() . '_url' ), 301 );
?>
@@ -190,7 +190,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
$addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : '';
if ( get_query_var( 'withcomments' ) )
$addl_path .= 'comments/';
- $addl_path .= user_trailingslashit( 'feed/' . ( ( 'rss2' == get_query_var('feed') || 'feed' == get_query_var('feed') ) ? '' : get_query_var('feed') ), 'feed' );
+ $addl_path .= user_trailingslashit( 'feed/' . ( ( get_default_feed() == get_query_var('feed') || 'feed' == get_query_var('feed') ) ? '' : get_query_var('feed') ), 'feed' );
$redirect['query'] = remove_query_arg( 'feed', $redirect['query'] );
}

0 comments on commit cafb512

Please sign in to comment.