2

I have my website built with wordpress 4.5.2.

For wordpress contro panel, it it normal to login with myweb.com/wp-admin directory. But I have another control panel with other application in the directory myweb.com/admin.

The problem is whenever I try to login to myweb.com/admin it redirects to myweb.com/wp-admin

How to disable it?

Priyamanu
  • 173
  • 3
  • 10

2 Answers2

5

You should cancel the default shortcuts in function.php :

remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
Mostafa Norzade
  • 1,059
  • 2
  • 17
  • 35
Pierre
  • 679
  • 1
  • 4
  • 13
  • For anyone else with the same question. This here is the correct answer. For reference see https://developer.wordpress.org/reference/functions/wp_redirect_admin_locations/ – Phaze Phusion Aug 07 '17 at 10:51
0

Can you please add below code in your functions.php

remove_action('template_redirect', 'redirect_canonical');

I hope this solution is work for you

Purvik Dhorajiya
  • 3,880
  • 3
  • 28
  • 40