Do proper canonical redirect for ?paged=1 or /page/1/. fixes #11696

git-svn-id: http://svn.automattic.com/wordpress/trunk@12691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-01-10 18:56:03 +00:00
parent 9ad08bb69f
commit 145db4bad0
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
if ( $paged > 1 && !is_single() ) {
$addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit("page/$paged", 'paged');
} elseif ( !is_single() ) {
$addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit($paged_redirect['path'], 'paged');
$addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : '';
}
} elseif ( $paged > 1 ) {
$redirect['query'] = add_query_arg( 'paged', $paged, $redirect['query'] );