$urlprefix = ""; if (!strstr($_SERVER['QUERY_STRING'], "http://") && !strstr($_SERVER['QUERY_STRING'], "https://")) { $urlprefix = "http://"; } else { $urlprefix = ""; } echo "\n";