Where can I turn off this redirection?

• This question is almost similar to what you are asking!!! stackoverflow.com/questions/1976781/… – sri Feb 18 '14 at 13:33
• Please do a bit more search on this site and I am sure you will find a solution for this problem... – sri Feb 18 '14 at 13:41

If you look at canonical.php you will notice that the wp_redirect_admin_locations function is hooked very late-- at priority 1000. This means that just about any function hooked to redirect_canonical runs before this one. So, conditionally remove wp_redirect_admin_locations from the template_redirect hook.

add_action(
'template_redirect',
function() {
$requ = untrailingslashit($_SERVER['REQUEST_URI']);
if (site_url('login','relative') === untrailingslashit( $_SERVER['REQUEST_URI'] )){ remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 ); } } );  This answer is based on the findings of “login” in permalink redirects to wp-login.php wp3.6 # Disable "/login" redirect As already stated there the relevant code is located at the very end in /wp-includes/canonical.php You need to remove the default "wp_redirect_admin_locations" and replace it with a slightly modified custom version. Add this to your function.php file. function custom_wp_redirect_admin_locations() { global$wp_rewrite;
if ( ! ( is_404() && $wp_rewrite->using_permalinks() ) ) return;$admins = array(
home_url( 'dashboard', 'relative' ),
site_url( 'dashboard', 'relative' ),
);
if ( in_array( untrailingslashit( $_SERVER['REQUEST_URI'] ),$admins ) ) {
exit;
}

$logins = array( home_url( 'wp-login.php', 'relative' ) ); if ( in_array( untrailingslashit($_SERVER['REQUEST_URI'] ), \$logins ) ) {
exit;
}
}