• This plugin isn’t working for correctly for me. If I have it set to go to the login page it’s fine, but when I try to specify a page I get this error:

    Redirect Loop

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    The browser has stopped trying to retrieve the requested item. The site is redirecting the request in a way that will never complete.

    It was working before I upgraded to 2.5 (I had 2.3.3), but I had to use version 0.4.2. I was getting the same error with 0.5.0 and 0.5.1. I thought upgrading WP might fix the issue, but it didn’t. I tried using 0.4.2 with 2.5 but it doesn’t work at all (it’s letting in non-registered viewers, plus there’s a header error across the top of the page).

    Can you shed any light on this issue?

    https://www.ads-software.com/extend/plugins/members-only/

Viewing 12 replies - 1 through 12 (of 12 total)
  • This was a bug in 0.5 which I fixed in version 0.5.1, it’s definitely working as I’m using redirection to specific page on my own site.

    https://code.andrewhamilton.net/wordpress/plugins/members-only/

    0.5.1 also removes the need to have <?php wp_head ?> in the your header.php of your template. Without that, previous versions would do anything.

    Try using Members Only 0.5.1 with WordPress 2.5 and let me know if it still not working for you. You can email me at [email protected]

    You also might want to clear your cache in Firefox, incase it’s cached up the site due to the numerous redirects.

    / Hami

    Thread Starter emiline220

    (@emiline220)

    I’m using 0.5.1 and it works fine if I just want it to go to the login page, but I really want it to redirect to a specific page and I’m still getting that error when I try. I cleared my cache and I even tried a different browser and I got an error page there, too (it just said page not found, it wasn’t specific).

    The weird thing is that I’m using this plugin on another blog (using WP 2.3.3) on a different server and it’s working perfectly, so maybe that means it’s some kind of server misconfiguration issue? I don’t mind talking to my host but I don’t really know what to tell them is wrong. Any ideas?

    Very odd – I’ll see if I can replicate this issue.
    Can you tell me if your using permalinks in your WordPress 2.5 install (and in your WordPress 2.3.3) or not?

    Thanks,

    / Hami

    Thread Starter emiline220

    (@emiline220)

    I think that may be the issue. I just checked the permalinks on the 2.5 blog and they are kind of strange. It’s trying to insert index.php after everything (like jurgennation.com/index.php or jurgennation.com/index.php/archives/, etc.). It didn’t used to be like that, so I’m not sure if they recently made some changes to the server or what. But I went and changed the redirection page to index.php/registration (which I verified is the correct page url), thinking that might fix it, but I still got the error after I logged out and tried going to the site.

    On the 2.3.3 blog where it’s working perfectly, I do have nice permalinks (year/month/day/name).

    Try changing the permalinks to ‘Default’ and save your settings, then change them back to how you want them. That my fix the permalink issue.

    / Hami

    ok I’m having this problem on a massive level, it has to be the plugin because everything works fine otherwise.

    My wp is in example.com/wordpress, and my blog url is set to example.com. So I have the plugin on and set to redirect a user back to where they came in at after logging in. So let’s say you get a link in email to go to example.com/2008/16/04/post-title/ this is the result: https://example.com/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/wp-login.php?redirect_to=/

    And then it dies. Obviously (and I mentioned this before) the plugin is not aware of where my wp install is.

    ok I have fixed it temporarily by changing line 267 from $output = "/wp-login.php"; to $output = "/wordpress/wp-login.php";. Is this ok?

    Before this plugin I was using wp_authenticate and this plugin to redirect:

    <?php /*
    
    **************************************************************************
    
    Plugin Name:  From Where You Came
    Version:      1.0.0
    Description:  Makes the "Login" and "Logout" links take you back from where you came.
    Author:       Viper007Bond
    Author URI:   https://www.viper007bond.com/
    
    **************************************************************************/
    
    add_filter( 'loginout', 'fromwhereyoucame' );
    
    function fromwhereyoucame( $link ) {
    	$currenturl = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    
    	if ( !is_user_logged_in() )
    		$link = str_replace( '">', '?redirect_to=' . urlencode( $currenturl ) . '">', $link );
    	else
    		$link = str_replace( '">', '&amp;redirect_to=' . urlencode( $currenturl ) . '">', $link );
    
    	return $link;
    }
    
    ?>

    But I like having my feeds on and would really like to stick with this plugin.

    I think this may be the issue your having. Have you got WordPress installed in a different directory than the site root?

    I’m going to be releasing a new version this weekend, version 0.6.5, and this issue should be fixed in it.

    / Hami

    I am having redirect issues as well. I did have WordPress installed in a “wordpress” directory, but I moved it to the root to make sure that was not the cause. Basically any time I try to redirect, I get the same error message mentioned above. The weird thing is that it worked when I was developing the site on the “wordpress” sub-directory and now it doesn’t at the root directory.

    When logged in, I can access all the pages just fine. Logged out, every page gives me the browser error page saying the redirect will never finish.

    WP 2.5.1 and Members Only 0.6.5

    I was able to resolve this issue. I changed settings to include the ‘www’ in the blog and WP URL – this broke everything and started the loop. It had to do with the comparison of what the current URL vs redirect URL was – one had the www, the other did not. Although both would work, this comparison failed and it kept trying to redirect https://domain.com/whatever to https://www.domain.com/whatever to https://domain/whatever and on and on…

    I’ll have a look at this over the weekend see how I can fix this issue.

    / Hami

    Hi, has this been resolved? I’m having the same issue–redirect does not complete.

    sccr410, how did you change the settings to include the www? You can’t change anything before the https://domain.com/ on the plugin screen. Do I have to find a line in the plugin file? And will this definitely fix it?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Members Only] Not working – Redirect Error’ is closed to new replies.