Title: redirect script stopped working
Last modified: May 25, 2022

---

# redirect script stopped working

 *  Resolved [Elena Altman](https://wordpress.org/support/users/mmtb/)
 * (@mmtb)
 * [4 years ago](https://wordpress.org/support/topic/redirect-script-stopped-working/)
 * I have always had no trouble with your force login bypass in order for the registration
   page to come up and not go back to login page. Recently, wordpress auto updated
   to 6.0 and it broke it, that and/or I updated my server to business account on
   godaddy. Either way… It stopped working, I have tried everything and it wont 
   work anymore, I even downgraded my wordpress to the last known compatible version
   you list, and still nothing. It just doesn’t work anymore, I have used it for
   years. I don’t know what to do 🙁
 * This is the script I use in my functions.php file:
 *     ```
       function my_forcelogin_bypass( $bypass, $visited_url ) {
         // Allow all single posts
         if ( is_single() ) {
           $bypass = true;
         }
   
         // Allow these absolute URLs
         $allowed = array(
           home_url( '/register-now/' ),
           home_url( '/mmtb-festivals/' ),
           home_url( '/Activate/' ),
         );
         if ( ! $bypass ) {
           $bypass = in_array( $visited_url, $allowed );
         }
   
         return $bypass;
       }
       add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass', 10, 2 );
   
       /////
       ```
   
    -  This topic was modified 4 years ago by [Elena Altman](https://wordpress.org/support/users/mmtb/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fredirect-script-stopped-working%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [4 years ago](https://wordpress.org/support/topic/redirect-script-stopped-working/#post-15681802)
 * Hi– thanks for using Force Login!
 * Can you elaborate on how exactly “it broke” after updating WordPress? Is there
   an error being thrown? Try enabling [WP_DEBUG](https://wordpress.org/support/article/debugging-in-wordpress/)
   to see if any errors are being thrown.
 * The bypass script you’re using looks fine, I don’t suspect that is the cause 
   of your issue.
 * Since it stopped working after you upgraded your hosting server, I would contact
   their support to see if they can help you pinpoint the cause of this issue.
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘redirect script stopped working’ is closed to new replies.

 * ![](https://ps.w.org/wp-force-login/assets/icon.svg?rev=1904031)
 * [Force Login](https://wordpress.org/plugins/wp-force-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-force-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-force-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-force-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-force-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-force-login/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/redirect-script-stopped-working/#post-15681802)
 * Status: resolved