Support » Requests and Feedback » http and https

http and https

  • hi there
    i am really pissed by a simple problem: i can’t have both http://somesite/weblog and https://somesite/weblog working – the first problem is with the cookies (w/o correcting them you even can’t use https!) the second is simple – you can not use in options only somesite.weblog you must use http:// or https://
    wwell edi

Viewing 4 replies - 1 through 4 (of 4 total)
  • my host has different folders for http and https! i am not sure how to make them work together either. 🙂

    To give more detail, the fix for cookies so that logins work for an https:// site is:
    Change the following line in wp-includes/vars.php from:

    define('COOKIEPATH', preg_replace('|http://[^/]+|i', '', get_settings('home') . '/' ) );


    define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('home') . '/' ) );

    (from mcnicold)

    I have found that to do belown in file wp_login.php can solve my problem .
    Change this:
    if ( dirname(‘http://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]) != get_settings(‘siteurl’) )
    update_option(‘siteurl’, dirname(‘http://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]) );
    to that:
    if ( dirname($server_protol . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘SCRIPT_NAME’]) != get_settings(‘siteurl’) )
    update_option(‘siteurl’, $server_protol . $_SERVER[‘HTTP_HOST’] . dirname( $_SERVER[‘SCRIPT_NAME’]) );

    thanks a lot, it works !

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘http and https’ is closed to new replies.
Skip to toolbar