Add "Are we already on HTTPS" check

When just checking if https setting is true, we get into a loop if we're already on HTTPS. By checking whether PHP's 'https' value is set, we avoid the loop. (Note: Documentation says "non-empty" for https, so if it isn't set when we're on HTTP)