Title: Maintenance Mode Redirection Issue
Last modified: December 26, 2022

---

# Maintenance Mode Redirection Issue

 *  Resolved [codejp3](https://wordpress.org/support/users/codejp3/)
 * (@codejp3)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/maintenance-mode-redirection-issue/)
 * Not sure if your plugin is the cause, but wanted to reach out to you first since
   disabling this plugin allows me to login when in maintenance mode.
   I use the 
   bbPress login features as the main site login. It’s a shortcode embedded in the
   page title “login”, permalink – [https://mysite.com/login/](https://mysite.com/login/)
 * I have your plugin setup to redirect logins to “login”. It’s working, except 
   when in maintenance mode.
 * I use the “[minimal coming soon](https://wordpress.org/plugins/minimal-coming-soon-maintenance-mode/)”
   plugin for maintenance mode. It has an option for “Custom login URL” to whitelist
   a specific login URL in case the default wp-login.php is disabled/altered like
   your plugin does. I’ve tried specifying “login”, “/login”, “login/”, “/login/”,“
   [https://mysite.com/login&#8221](https://mysite.com/login&#8221); & “[https://mysite.com/login/&#8221](https://mysite.com/login/&#8221);
   in that field and the result is the same for all – I get locked out of my site
   anytime I’m in maintenance mode.
   When I try to access the login page, it takes
   about 20-30 seconds to respond, and redirects to this URL:[https://mysite.com/login/?login=nothing_entered](https://mysite.com/login/?login=nothing_entered)
 * And displays the message: 
   “The page isn’t redirecting properly”
 * Again, I’m not 100% sure that it’s your plugin causing the lock-out issue, bu
   with your plugin disabled, both the default wp-login.php page work and the custom
   bbPress “login” page work when in maintenance mode, which indicates an issue 
   with this plugin, not either one of them.
 * With your plugin enabled, I get stuck in the redirection loop and the login page
   becomes inaccessible, locking me out of the site completely.
 * Can you direct me in the best way to narrow down the culprit and resolve this
   issue?

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

 *  Plugin Support [MaximeWPS](https://wordpress.org/support/users/seinomedia/)
 * (@seinomedia)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/maintenance-mode-redirection-issue/#post-16357505)
 * Hello,
 * Thanks for using WPS Hide Login.
 * I don’t understand your question because WPS Hide Login doesn’t let ? in secret
   slugs. They’re removed when settings are saved.
 *  Thread Starter [codejp3](https://wordpress.org/support/users/codejp3/)
 * (@codejp3)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/maintenance-mode-redirection-issue/#post-16376901)
 * > I don’t understand your question because WPS Hide Login doesn’t let ? in secret
   > slugs. They’re removed when settings are saved.
 * That’s probably the conflict.
 * The bbpress login function, (specifically the [bbpress stylepack plugin](https://wordpress.org/plugins/bbp-style-pack/))
   is what is kicking back the “[?login=nothing_entered](https://mysite.com/login/?login=nothing_entered)”
   error when your plugin is enabled.
 * The bbpress code related to this login issue is:
 *     ```wp-block-code
       function bsp_login_failed( $username, $error ) {
       	$errors = reset($error);
       	$failed = '' ; //just in case nothing is passed !
       	if (!empty($errors['invalid_username'])) $failed = 'invalid_username' ; 
       	if (!empty($errors['incorrect_password'])) $failed = 'incorrect_password' ; 
       	if (!empty($errors['empty_username'])) $failed = 'empty_username' ; 
       	if (!empty($errors['empty_password'])) $failed = 'empty_password' ; 
       	if (!empty($errors['empty_password']) && !empty($errors['empty_username'] )) $failed = 'nothing_entered' ; 
       	$referrer = bsp_current_page_url();  // where did the post submission come from?
          // if there's a valid referrer, and it's not the default log-in screen
          if ( !empty($referrer) && !strstr($referrer,'wp-login') && !strstr($referrer,'wp-admin') ) {
       	   //then strip any old referrer requests
       	   if (strpos( $referrer, '?') !== false) {
       		  $referrer = substr ($referrer, 0 , strpos ($referrer , '?')) ;
       		}
       		add_query_arg( 'login', $failed );
       		wp_redirect( $referrer . '?login='.$failed );  // let's append some information (login=failed) to the URL for this plugin to use
       		//wp_redirect( $referrer) ;
              exit;
          }
       }
       ```
   
 * Is there something you can adjust within this plugin to account for the hard-
   references to ($referrer,’wp-login’) & ($referrer,’wp-admin’), or do you have
   suggested revisions that should be applied to the bbpress login to allow it to
   work with your plugin?
 *  Plugin Support [MaximeWPS](https://wordpress.org/support/users/seinomedia/)
 * (@seinomedia)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/maintenance-mode-redirection-issue/#post-16384388)
 * Hello,
 * The bbpress plugin is made to create a public login page.
 * WPS Hide Login creates a secret slug instead of wp-login.php and redirects non-
   loggedin users to 404.
 * There’s nothing to adjust because the WPS Hide Login slug doesn’t had to be public.
 *  Thread Starter [codejp3](https://wordpress.org/support/users/codejp3/)
 * (@codejp3)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/maintenance-mode-redirection-issue/#post-16419859)
 * Appreciate the reply, but I think you’re giving up too easy.
 * Why can’t I add a check in the bbPress login for “if wps-hide-login active”, 
   and then get the secret slug option value and use that instead of the default
   wp-login.php?

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

The topic ‘Maintenance Mode Redirection Issue’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [codejp3](https://wordpress.org/support/users/codejp3/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/maintenance-mode-redirection-issue/#post-16419859)
 * Status: resolved