Membership 2 Pro members not able to log in

People are not able to login to my membership portal. When they try to log in, it redirects to: 80

  • Adam Czajczyk
    • Support Gorilla

    Hello Senor Chavez,

    I hope you're well today and thank you for your question!

    I have checked the chat and your site and while I can see a redirect, I'm still not sure why it is happening.

    Your developer suggested that this might be a "plugin setting" but Membership 2 Pro doesn't have any setting like that and is supposed to directly follow SiteURL scheme (protocol prefix: http or https) which also means that with a properly configured webserver (Apache, nginx etc) port number shouldn't be added there.

    I have checked site configuration and there seems to be only a couple of plugins active and nothing "unusual" in setup.

    I noticed that my colleague asked you during chat to run a conflict test and that didn't reveal anything but I'd like to make sure if the test was "full", so apart from disabling all the plugins, did you also try to switch the site to a Twenty Seventeen theme?

    If not, please try it: switch the site to Twenty Seventeen theme, purge WP Engine's cache and then try again (purging cache is very important here).

    I'd also like you to try one other thing: I noticed some additional rules in .htaccess. Some of them seems to be related to the theme that you're using. Please make a copy of the current .htaccess file and then edit the original one so only these rules would be left in it:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    Then again clear WP Engine's cache and check the site against the issue.

    Let me know, please, about the results of both these tests. Also, was the site moved to WP Engine from some other host or a localhost or was it setup there from the scratch? Was this issue there from the beginning or did it started to happen just recently?

    Best regards,

  • Senor Chavez
    • Flash Drive

    Hi Adam,

    I tried changing the htcaccess files and it seems to be of no help. This is what our developer said:

    The only thing that really stands out is the URL that the site redirects to when you visit the site:

    Looks like its picking up the 80 in the end there as part of the URL and thats where its coming from. However Im not sure where that redirect is set. The issue is the redirect is picking up the https and the 80 port. Could you please check on that. Thanks!

  • Predrag Dubajic
    • Support

    Hi Senor Chavez,

    The port in the URL is indeed the issue here, https doesn't make any difference, but the %3A80 part is what's causing it.
    If you remove that part from the URL then the login works fine.

    Port 80 is default port for HTTP connection and if you visit it will redirect to HTTPS version, but it breaks when HTTPS uses that port.

    The thing is that the issue seems to be specific to your installation so it's probably something related to SSL configuration.
    When I check my test site with HTTPS it works fine and it doesn't add any additional ports in the URL, you can see it here
    When you visit that protected site it doesn't add %3A80 part in the address.

    Can you get in touch with WP Engine support so they can have a look at the SSL settings and see what might be causing this port to pop up in the URL?

    Best regards,

  • Phil
    • Flash Drive

    We were able to get this fixed in our particular situation. There was an SSL termination issue occurring. We fixed it by appending the following line of code to plugins/membership/lib/wpmu-lib/inc/class-thelib-net.php

    $_SERVER[‘SERVER_PORT’] = 443

    It left this section of code looking like this:
    $_SERVER['SERVER_PORT'] = 443;
    if ( ! isset( $_SERVER['SERVER_PORT'] ) ) {
    if ( $is_ssl ) { $_SERVER['SERVER_PORT'] = '443'; }
    else { $_SERVER['SERVER_PORT'] = '80'; }

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.