• Resolved tornevall

    (@tornevall)


    Due to something in the function replaceDomain and shouldReplaceDomain, logging in on the extra defined hostname is completely blocked. Even if the control is based on wp-admin and is_admin() also, the regular login page is blocked and redirected to the base host. For some reason I can’t add an own filter that fixes the hostname during this check – I’m still redirected somewhere else.

    Is it possible to have an extra filter here, or something, that decided whether to stop wp-admin on an alternate domain or not?

    I run a production site on host.net, but when developing in stage I log in via host.com before pushing out changes and this no longer works as the .com site continuously redirects me to the production site.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tornevall

    (@tornevall)

    Sidenote: Unfortunately is the current, as it seems, only workaround to do this in MutipleDomain.php – after this, it works again:

    (Where also the wp-admin check is removed. This problem also stops, when trying to login directly via wp-login.php)

    
    public function replaceDomain($url)
        {
            /*if (!$this->shouldReplaceDomain()) {
                return $url;
            }*/
    
            if (array_key_exists($this->domain, $this->domains)) {
                $domain = $this->getDomainFromUrl($url);
                $url = str_replace($domain, $this->domain, $url);
            }
            return $url;
        }
    
    • This reply was modified 5 years, 10 months ago by tornevall.
    Plugin Contributor Gustavo Straube

    (@gustavostraube)

    Hello,

    I’ve just released an update that fixes this issue. It’s related to [issue #39](https://github.com/straube/multiple-domain/issues/39) reported on the plugin’s repository.

    Hope this release will fix the issue you got.

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Version 0.8.5 completely prevents login on “the other domain”’ is closed to new replies.