さくらのレンタルサーバーはhttpsが80で落ちてくる。。。
if( isset($_SERVER['HTTP_X_SAKURA_FORWARDED_FOR']) && $_SERVER['HTTP_X_SAKURA_FORWARDED_FOR'] ){ $_SERVER['HTTPS'] = 1; $_SERVER['SERVER_PORT'] = 443; }