Title: No redirection
Last modified: August 21, 2016

---

# No redirection

 *  [gael1980](https://wordpress.org/support/users/gael1980/)
 * (@gael1980)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/no-redirection-2/)
 * Hi!
    Thank you for this plugin. I’m using WordPress 3.8 and Access Control 4.0.6
   but the redirection on the home page doesn’t word anymore… We cannot access to
   anything on the blog but the home page is not redirected. Thank you!
 * [http://wordpress.org/plugins/wordpress-access-control/](http://wordpress.org/plugins/wordpress-access-control/)

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

 *  Thread Starter [gael1980](https://wordpress.org/support/users/gael1980/)
 * (@gael1980)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/no-redirection-2/#post-4426007)
 * I’m also using “BuddyPress” 1.9. Maybe the problem comes from that.
 *  [zooguy](https://wordpress.org/support/users/zooguy/)
 * (@zooguy)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/no-redirection-2/#post-4426081)
 * I upgraded from 3.1.4 to 4.0.8 and now my login redirections aren’t working.
 * If I’m not logged in and attempt to access a page that that is for members only,
   I see the login window but with the following url:
    [http://www.mywebsite.org/subdirectory/wp-login.php?redirect_to=http%3A%2F%2Fwww.mywebsite.org%2Fsubdirectory%2Fsubdirectory%2F%3Fpage_id%3D28](http://www.mywebsite.org/subdirectory/wp-login.php?redirect_to=http%3A%2F%2Fwww.mywebsite.org%2Fsubdirectory%2Fsubdirectory%2F%3Fpage_id%3D28)
 * For some reason, the subdirectory name is appearing twice in the redirect URL.
 * I’m using WordPress 2.6.1
 *  [zooguy](https://wordpress.org/support/users/zooguy/)
 * (@zooguy)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/no-redirection-2/#post-4426082)
 * When I removed the reference to site_url in check_for_members_only, I no longer
   had a problem. I notice that site_url wasn’t being used in 3.1.4.
 *  [Nikolalz](https://wordpress.org/support/users/nikolalz/)
 * (@nikolalz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/no-redirection-2/#post-4426117)
 * I have the same problem, just updated the plugin on my site and it’s no longer
   redirecting to the login page.
    There is any wayto fix this problem?
 *  [jkaluski](https://wordpress.org/support/users/jkaluski/)
 * (@jkaluski)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/no-redirection-2/#post-4426140)
 * WP Version 3.8.2
    WPAC Version 4.0.8
 * I too was getting doubled subdirectory when default (blank) options for redirects
   were used. I found what zooguy was talking about. Went Here:
 *     ```
       if (empty($redirect_to)) {
                 if (empty($default_redirect)) {
                   header('Location: ' . wp_login_url(site_url($_SERVER['REQUEST_URI'])));
                 } else {
                   header('Location: ' . add_query_arg('redirect_to', $_SERVER['REQUEST_URI'], $default_redirect));
                 }
               } else {
                 header('Location: ' . add_query_arg('redirect_to', $_SERVER['REQUEST_URI'], $redirect_to));
               }
       ```
   
 *  and replaced:
    `header('Location: ' . wp_login_url(site_url($_SERVER['REQUEST_URI'])));`
 * with:
 * `header('Location: ' . wp_login_url($_SERVER['REQUEST_URI']));`
 * worked well for defaults.
 * Anything I put into the “Default Redirect For Members Only Pages”
    causes a redirect
   loop and crashes it.

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

The topic ‘No redirection’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-access-control.svg)
 * [WordPress Access Control](https://wordpress.org/plugins/wordpress-access-control/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-access-control/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-access-control/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-access-control/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-access-control/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-access-control/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [jkaluski](https://wordpress.org/support/users/jkaluski/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/no-redirection-2/#post-4426140)
 * Status: not resolved