Canonical redirect to correct location if rss2 is not default feed. wp-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
This commit is contained in:
parent
1e3b84960f
commit
cafb51263a
|
@ -1,12 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Redirects to the RSS2 feed
|
* Redirects to the default feed
|
||||||
* This file is deprecated and only exists for backwards compatibility
|
* This file is deprecated and only exists for backwards compatibility
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require( './wp-load.php' );
|
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) : '';
|
$addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : '';
|
||||||
if ( get_query_var( 'withcomments' ) )
|
if ( get_query_var( 'withcomments' ) )
|
||||||
$addl_path .= 'comments/';
|
$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'] );
|
$redirect['query'] = remove_query_arg( 'feed', $redirect['query'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue