WordPress.org

Support

Support » Plugins and Hacks » WordPress HTTPS (SSL) » [Resolved] Login subdomain

[Resolved] Login subdomain

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Mike Ems

    @mvied

    Hi staze,

    It took me a while to figure out, but this feature has been added in version 1.9. Let me know if you get it working.

    Thanks,
    Mike

    Mike,

    What settings are used for this? I’ve enabled and set shared SSL to be “https://admin.example.com”, and then enabled “force shared ssl admin”, but I don’t see any change.

    Thanks!

    Plugin Author Mike Ems

    @mvied

    Hey staze,

    That should be all you have to do. If it’s not working, you can post or email me the link at mike[at]mvied[dot]com and I can take a look at why it’s not redirecting properly. I may need to login to the site as an admin to test bug fixes for the plugin. It’s understandable if you’re not comfortable with that, but I’d really like to help.

    Thanks,
    Mike

    Mike,

    Here’s one culprit….

    [Tue Jul 19 10:02:34 2011] [error] [client 67.171.240.215] PHP Warning: Cannot modify header information – headers already sent by (output started at /Library/WebServer/Documents/example.com/wp-content/plugins/wordpress-https/wordpress-https.php:453) in /Library/WebServer/Documents/example.com/wp-content/plugins/wordpress-https/wordpress-https.php on line 454

    Wonder if it’s stepping on w3tc’s toes…

    Plugin Author Mike Ems

    @mvied

    Hmm, that’s right before the redirect.

    Try adding ob_start(); after while(@ob_end_flush());.

    If that doesn’t work, try changing while(@ob_end_flush()); to while(@ob_end_clean()); without ob_start(); after it. If that doesn’t work, try it with ob_start(); after it.

    Let me know if any of that works.

    Thanks,
    Mike

    So, “while(@ob_end_clean());” allowed the admin page to load, though not really completely (missing CSS, etc). After logging in, I get a cannot connect because it seems the redirect_to isn’t being set correctly.

    https://admin.example.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.example.com%2Fwp-admin%2F&reauth=1

    The CSS not loading seems to be because looking at the code at least, it’s trying to load them from https://www.example.com rather than https://admin.example.com.

    Thanks for helping out on this… we’ll get it!

    Plugin Author Mike Ems

    @mvied

    Try taking the redirect_to out of the URL and trying it. So, just https://admin.example.com/wp-login.php.

    Also, I just fixed the CSS not loading issue for another user, so I’ll be pushing out a bug fix release today that should take care of that.

    Not that easy, I’m afraid. It logs in, but I get a page not found, because the submit button code looks like:

    <p class="submit">
    <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Log In" tabindex="100" />
    <input type="hidden" name="redirect_to" value="https://www.example.com/wp-admin/" />
    <input type="hidden" name="testcookie" value="1" />
    </p>

    So we’d need to rewrite that with the plugin, I’m assuming, to be:

    <p class="submit">
    <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Log In" tabindex="100" />
    <input type="hidden" name="redirect_to" value="https://admin.example.com/wp-admin/" />
    <input type="hidden" name="testcookie" value="1" />
    </p>
    Plugin Author Mike Ems

    @mvied

    I see. I believe my bug fix version will fix this as well.

    Replace the contents of wordpress-https.php with the code here. http://mvied.com/wordpress-https.txt

    Let me know if that fixes it.

    Hmm… it the fixed the css, but the submit button still has www, and the redirect in the url still has www. =/

    the loginform is accurate though.

    So it’s kind of odd. If you remove the bad “redirect_to” in the url, you get the wp-login.php page at https://admin.example.com, you try to login, and you get bounced to http://www.example.com/wp-admin, which then bounces you to admin.example.com/wp-login.php again, with the bad redirect_to. rinse, repeat.

    As another side note, the “back to sitename” at the bottom of the login page shows the subdomain (admin.example.com) rather than the real site (www.example.com).

    Let me know if you need more info.

    Plugin Author Mike Ems

    @mvied

    Do you mind if I take a look at it? If you don’t want it public you can email it to me.

    emailed. Will make sure to post back to this thread once we have some results.

    Plugin Author Mike Ems

    @mvied

    The issue seems to be the strange login bug that has yet to be fixed. I believe it has something to do with logging into the admin panel using the Shared SSL URL for the first time. Then again, I’ve had others report the problem that aren’t using Shared SSL. It’s certainly something I’m aware of and trying to fix.

    In the meantime, resetting your cookies will allow you to log in again.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Resolved] Login subdomain’ is closed to new replies.
Skip to toolbar