HTTPS to HTTP on LogOut (10 posts)

  1. kansascoder
    Posted 5 years ago #


    We are running WordPress in network mode and we've been unable to resolve a problem we are encountering with controling the transition from secure pages to non-secure pages.

    The only place that is giving us problems is when a user logs out. Even if they are on a non secure page the logout selection wants to return them to an https page. The link that is having the issue is in the top loeft corner of the blog in the menu under the username. Here there are 3 choices: Edit My Profile, Dashboard and Logout. Clicking on logout takes them to wp_login with the querystring "action=logout&_wpnonce=4daa532372". We are forcing users (via the force_ssl_login config entry) to login with ssl but when logging out we want them to return to the non secure.

    Any idea how this can be accomplished?

  2. kansascoder
    Posted 5 years ago #

    I should mention we are running this on Windows with IIS7

  3. If you mean the admin bar links, it's ... complicated to edit those.

    If you had meant any other links: http://codex.wordpress.org/Function_Reference/wp_logout_url#Logout_and_Redirect_to_Homepage

  4. kansascoder
    Posted 5 years ago #

    Yeah..it's the admin bar.

  5. I know how to do this manually, but it's a PITA.

    Maybe this plugin can do it? http://wordpress.org/extend/plugins/wp-custom-admin-bar

  6. kansascoder
    Posted 5 years ago #

    I was afraid of that. The plugin doesn't appear to allow the http type to be set so that won't do what I need.

    I hardcoded 'http' as the scheme parameter for the get_home_url function (they should always be http anyway) as the admin bar uses that function but for some reason it ignores it and still uses https. Odd. Do I need to do an iisreset after altering functions before the changes take effect?

  7. No, it's because it's coded differently. The only way I know of to do that is to build a function to remove that section from the menu and then build your own version. I did that on my site, but I didn't write it up...

    Here's a tutorial on how to add menus to the admin bar: http://sumtips.com/2011/03/customize-wordpress-admin-bar.html

    You'll want to remove my-account-with-avatar and add in your own version with https instead of http.

    Now that said, if you've turned on SSL, you DID do this in the wp-config.php file, right? Cause if THAT isn't pulling in the http/https bit, we have a bug.

  8. kansascoder
    Posted 5 years ago #

    Hmm...The only values in my wp-config that relate to SSL (AFAIK) are:
    define( 'FORCE_SSL_ADMIN', true );
    define( 'FORCE_SSL_LOGIN', true );

    Is there another setting I should put in there?

  9. No that's it. Huh. Would you be willing to post in http://core.trac.wordpress.org/ and report that changing the SSL settings in wp-config is NOT affecting the admin bar? You can login with the same ID/pwd you use here :)

  10. kansascoder
    Posted 5 years ago #

    will do..thanks for your help

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.