From 6300514de7b5af8e7e096023900dc4cb3e051904 Mon Sep 17 00:00:00 2001 From: nacin Date: Wed, 8 Feb 2012 18:03:25 +0000 Subject: [PATCH] Let wp-admin work as well as wp-admin/ for the canonical redirect. see #19607. git-svn-id: http://svn.automattic.com/wordpress/trunk@19878 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 248989759b..9e9fd27e01 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -93,7 +93,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) { } if ( ! $redirect_url && get_option( 'home' ) != get_option( 'siteurl' ) ) { - if ( $original['path'] == home_url( 'wp-admin/', 'relative' ) ) + if ( trailingslashit( $original['path'] ) == home_url( 'wp-admin/', 'relative' ) ) $redirect_url = admin_url(); elseif ( $original['path'] == home_url( 'wp-login.php', 'relative' ) ) $redirect_url = site_url( 'wp-login.php', 'login' );