Last fix didn't work in production..

This commit is contained in:
oyvinbak committed 2010-09-26 17:47:22 +02:00
1 parent c71d5f5b4c
commit 67932ea370
1 file changed
+3 -5
+3 -5
View File
@@ -1,11 +1,9 @@
<?php
$url = $_SERVER['SCRIPT_URI'];
if(substr($url, 0, 5) != 'https')
if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on')
{
$newurl = str_replace('http://','https://',$url);
header("Location: $newurl");
die;
header("Location: https://www.studentersamfundet.no{$_SERVER['REQUEST_URI']}");
die;
}
$time_start = microtime(true);