• Hello!
    Our site use Polylang for 12 languages in subdomain like ir.amarkets.com
    When i am try login on subdomain with Cerber – after login i am redirect on main domain login page and need enter login again. That wrong.

    Without Cerber i am redirect on current subdomain main page, and that right.

    Example:

    I am try login on ir.amarkets.com, after login i am redirect on http://www.amarkets.com and need input login again.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author gioni

    (@gioni)

    Hi!

    What kind of the login page do you use? Do you use a Custom login URL or the default wp-login.php?

    Thread Starter smarty111

    (@smarty111)

    Yes, we use custom link

    Plugin Author gioni

    (@gioni)

    If you can you edit PHP files, let’s do the following. Open the common.php file that is located in the plugins folder. Comment out 232 and 234 lines this way:

    function cerber_get_home_url() {
    	static $url;
    
    //      if ( ! isset( $url ) ) {
    		$url = trim( get_home_url(), '/' );
    //	}
    
    	return $url;
    }

    Save the file, check how the redirection works.

    Thread Starter smarty111

    (@smarty111)

    Can you fix this in the next update or add the ability to specify this to the settings?(checkbox for custom link for example)

    Unfortunately, our company policy does not allow custom code insertion into plugins.

    Plugin Author gioni

    (@gioni)

    I cannot fix anything until I know the cause of an issue. I suggest that you comment out a couple of lines in the plugin’s code which I suspect can cause the issue. So with no action on your side, there is nothing to fix.

    Thread Starter smarty111

    (@smarty111)

    function cerber_get_home_url() {
    	static $url;
    
    //      if ( ! isset( $url ) ) {
    		$url = trim( get_home_url(), '/' );
    //	}
    
    	return $url;
    }

    That not work, our login link look like:

    http://lang.site.test/custom/

    Before i am login on subdomain i am redirect on:

    http://www.site.test/custom/?redirect_to=http%3A%2F%2Fwww.site.test%2Fwp-admin%2F&reauth=1

    I am redirect from lang subdomain to main domain with this GET.

    Plugin Author gioni

    (@gioni)

    Are you redirected to the main site login page “http://www.site.test/custom/” when you enter in the browser “http://lang.site.test/custom/”?

    Thread Starter smarty111

    (@smarty111)

    No, i am not redirect when i am enter on page, i am redirect after enter fields and press login, and after that iam need enter fields again on main www site.

    • This reply was modified 7 years ago by smarty111.
Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Wrong redirect’ is closed to new replies.