Index: securepages.module =================================================================== --- securepages.module (revision 2) +++ securepages.module (working copy) @@ -6,6 +6,12 @@ * https pages */ +// Change base_url to HTTPS ($base_url may be explicitly set by settings.php) +if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { + global $base_url; + $base_url = str_replace('http://', 'https://', $base_url); +} + /** * Implementation of hook_boot(). */ @@ -473,4 +479,4 @@ } return TRUE; -} \ No newline at end of file +}