1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
--- scuttle.orig/header.inc.php 2009-09-13 13:49:05.000000000 -0300
+++ scuttle/header.inc.php 2009-09-13 13:51:37.000000000 -0300
@@ -24,7 +24,14 @@
$root .= '/';
}
$path = $root;
- $root = 'http://'. $_SERVER['HTTP_HOST'] . $root;
+ if ($_SERVER['HTTPS'] == 'on') {
+ $protocol = 'https';
+ } elseif ($_SERVER['SERVER_PORT'] == '443') {
+ $protocol = 'https';
+ } else {
+ $protocol = 'http';
+ }
+ $root = $protocol . '://'. $_SERVER['HTTP_HOST'] . $root;
}
// Error codes
|