Debug is throwing...
Notice: Undefined index: HTTPS in C:\\xampplite\\htdocs\\testsite\\wp-content\\themes\\mytheme\\header.php on line 4
Some servers simply don't set $_SERVER['HTTPS'] if the request is non-secure. Some others may set it to 'off'. You'll have to check it like this:
'off'
if ( isset( $_SERVER["HTTPS"] ) && strtolower( $_SERVER["HTTPS"] ) == "on" ) { $pageURL .= "s"; }