• hi there
    i am really pissed by a simple problem: i can’t have both https://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 https:// 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. ??

    Thread Starter Anonymous

    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('|https://[^/]+|i', '', get_settings('home') . '/' ) );

    To:

    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(‘https://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]) != get_settings(‘siteurl’) )
    update_option(‘siteurl’, dirname(‘https://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]) );
    to that:
    if(isset($_SERVER[‘HTTPS’]))
    $server_protol=”https://”;
    else
    $server_protol=”https://”;
    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’]) );

    Thread Starter Anonymous

    thanks a lot, it works !

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