Support » Plugin: Redirection » Exception for admin login at “old” URL

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author John Godley

    (@johnny5)

    I’m not sure I understand. Redirection won’t redirect wp-admin. WordPress may redirect this as part of it’s login process.

    Thread Starter JesperW

    (@jesperw)

    Hi John,

    What happens is:

    – oldurl.com/wp-admin or /wp-login is redirected to newurl.com/wp-admin or /wp-login

    – consequently, I cannot log in at oldurl.com without first disabling Redirection via FTP

    I don’t see how this can be a standard WordPress redirect, since the only way the site “knows” about newurl.com is via the Redirection plugin. Standard WP redirection has no reason to send me there.

    Also, the redirect_to string (which is WP standard) does, in fact, point to the correct backend at oldurl.com/wp-admin. After login, however, I am sent to newurl.com/wp-admin – and it obviously only accepts login credentials for that site, not for oldurl.com…

    Halp me, Obi Wan JohnGodley, you’re my only hope!

    (if screenshots / recordings will help I can provide them, but I don’t feel entirely comfortable putting my various backends etc. on public display)

    šŸ™‚
    /W

    The same thing happened to me recently, but even crazier as I’m unable to login even after disabling the redirection plugin via FTP. Tried wp-admin and wp-login.php both redirecting to the new URL.

    Plugin Author John Godley

    (@johnny5)

    If the plugin is disabled then it is not redirecting anything. Other things can cause redirects, not just Redirection, including WordPress itself.

    Jesper, I still don’t know what question is being asked. It might help to give specifics about what redirect you have created

    I’m not sure how the plugin works, but I’m guessing that it’s using JS for redirects as I couldn’t find any records in .htaccess. Since I cleared my browser cache for the last 24 hours I was able to login to my old admin.

    Plugin Author John Godley

    (@johnny5)

    It does not use JS for redirects. Your browser may cache things.

    Thread Starter JesperW

    (@jesperw)

    Hi John,

    I appreciate that you still have the patience to try and help šŸ™‚ you can see my redirects here: https://theviewmarketaccess.com/wp-content/uploads/2022/04/redirections-setup-scaled.jpg

    As you see, I am redirecting everything but the frontpage – also, I have tried to set up an exception for wp-admin.

    I just re-tested right now, it still doesn’t work; I have to FTP in and deactivate Redirection to log in to theviewaccess.com, and when I try to log out, it prompts me “you are trying to log out of theviewmarketaccess.com, are you sure?”, with the corresponding URL in the address bar…

    (I tried adding an exception for wp-login, too – didn’t work either)

    I sincerely hope any of this makes sense to you.

    Thanks again!

    šŸ™‚
    /W

    Plugin Author John Godley

    (@johnny5)

    You are only excluding the exact URL /wp-admin and that is happening after the global redirect. You would need to exclude all URLs involved in gaining access to WP, and it would need to occur before the global redirect.

    Thread Starter JesperW

    (@jesperw)

    Hi John,

    Duh… I am trying it out now, just to know I’m not leaving you hanging, now that you’re so patient with me – I want to be sure I am not being cheated by some browser caching stuff, will get back when I feel confident.

    Looks pretty promising, though šŸ˜Š

    /W

    Thread Starter JesperW

    (@jesperw)

    Quick follow-up: I think we got it now, and thought I would share for anyone else with this issue – this is how I managed to redirect everything except the root url, and make an exception for login/admin:

    /wp-login.* – regex, position = 0, redirection “Do Nothing”
    (excepts login from redirect)

    /wp-admin.* – regex, position = 1, redirection “Do Nothing”
    (excepts admin from redirect)

    / – ignore slash, position = 2, redirection “Do Nothing”
    (excepts root url from redirect)

    ^(.*) – regex, ignore slash, position = 3, redirection [newurl]/$1
    (redirects everything else to the new url and keeps everything after that)

    Again, thanks to John for a great plugin šŸ™šŸ˜Š

    /W

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.