Title: Wrong redirect code
Last modified: June 8, 2021

---

# Wrong redirect code

 *  [ezmana](https://wordpress.org/support/users/ezmana/)
 * (@ezmana)
 * [5 years ago](https://wordpress.org/support/topic/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/](https://example.com/wp-admin/) -> redirects to
   [https://example.com/](https://example.com/) with default 301 redirect header
   status. this code is makes redirect permanent.
 * when you try manually type new login url:
 * [https://example/mylogin/](https://example/mylogin/)
 * it is work, you reach your new login page. after you logged in you redirect to
   admin dashboard
 * [https://example.com/wp-admin/](https://example.com/wp-admin/)
 * 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/](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” );

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [NicolasKulka](https://wordpress.org/support/users/nicolaskulka/)
 * (@nicolaskulka)
 * [5 years ago](https://wordpress.org/support/topic/wrong-redirect-code/#post-14536032)
 * Hello,
 * By default it’s redirection 302, view documentation : [https://developer.wordpress.org/reference/functions/wp_safe_redirect/](https://developer.wordpress.org/reference/functions/wp_safe_redirect/)
 *  Thread Starter [ezmana](https://wordpress.org/support/users/ezmana/)
 * (@ezmana)
 * [5 years ago](https://wordpress.org/support/topic/wrong-redirect-code/#post-14544655)
 * Oh I see. Then my bad, sorry.
 * It could be coincidence but its look like I fixed my problem this way.
 * As I said and explained we had a redirect problem before this little revision.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Wrong redirect code’ is closed to new replies.

 * ![](https://ps.w.org/wps-hide-login/assets/icon-256x256.png?rev=1820667)
 * [WPS Hide Login](https://wordpress.org/plugins/wps-hide-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wps-hide-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wps-hide-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wps-hide-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wps-hide-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wps-hide-login/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [ezmana](https://wordpress.org/support/users/ezmana/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/wrong-redirect-code/#post-14544655)
 * Status: not a support question