Wrong redirect code
-
Hi there. I like this plugin and using for a long time. But latest update has a missing redirect parameter. This pattern I use like most of users:
https://example.com/wp-admin/ -> redirects to https://example.com/ with default 301 redirect header status. this code is makes redirect permanent.
when you try manually type new login url:
it is work, you reach your new login page. after you logged in you redirect to admin dashboard
but you had permanent redirect before that. you get to home again.
there is two way to get over it.
1. when you got permanent redirect, then you reach mylogin page manually then logged in, you can escape that with an extra query to url like that:
https://example.com/wp-admin/?
an extra query will override 301 redirect temporarily.
2. try fix plugin code yourself or wait for new update who knows when will come.
if you want to fix manually open “/wp-content/plugins/wps-hide-login/classes/plugin.php” file and look for “wp_safe_redirect()” code there is like 5 of them. adding extra parameter to this function will make login, dashboard etc. urls temporarily.FROM: wp_safe_redirect( $redirect );
TO: wp_safe_redirect( $redirect, “302” );
The topic ‘Wrong redirect code’ is closed to new replies.