$company_name = "fewo-marlies"; $seo_url = 2; if (!empty($_COOKIE['urltoken'])) { $urltoken = $_COOKIE['urltoken']; } else { $token_url = "http://www.onlineoff.ch/".$company_name."/home/get_urltoken.cfm"; $urltoken = file_get_contents($token_url); } $expires = time() + 3600; setcookie("urltoken", $urltoken, $expires); $url = "http://www.onlineoff.ch/".$company_name."/home/index.cfm"; if (!empty($_SERVER['QUERY_STRING'])) { $url = $url."?".$_SERVER['QUERY_STRING']; if (strpos(strtolower($_SERVER['QUERY_STRING']), "seo_url") === FALSE) { $url = $url."&seo_url=".$seo_url; } if ((strpos(strtolower($_SERVER['QUERY_STRING']), "cfid") === FALSE) || (strpos(strtolower($_SERVER['QUERY_STRING']), "cftoken") === FALSE)) { $url = $url."&".$urltoken; } } else { $url = $url."?seo_url=".$seo_url."&".$urltoken; } $company_path = "../../".$company_name."/home/index.cfm"; $inhalt = file_get_contents($url); if (strpos($inhalt, strtolower($_SERVER['SERVER_NAME'])) == 7) { header("HTTP/1.1 301 Moved Permanently"); header("Location: $inhalt"); header("Connection: close"); } /* $inhalt = str_replace("href=\"$company_path", "href=\"index.php", $inhalt); $inhalt = str_replace("href=\"index.cfm", "href=\"index.php", $inhalt); $inhalt = str_replace("href=\"../..", "href=\"http://www.onlineoff.ch", $inhalt); $inhalt = str_replace("href=\"..", "href=\"http://www.onlineoff.ch/$company_name", $inhalt); $inhalt = str_replace("src=\"../..", "src=\"http://www.onlineoff.ch", $inhalt); $inhalt = str_replace("src='../..", "src='http://www.onlineoff.ch", $inhalt); $inhalt = str_replace("src=../..", "src=http://www.onlineoff.ch", $inhalt); $inhalt = str_replace("src=\"/$company_name", "src=\"http://www.onlineoff.ch/$company_name", $inhalt); $inhalt = str_replace("src=\"..", "src=\"http://www.onlineoff.ch/$company_name", $inhalt); $inhalt = str_replace("action=\"../..", "action=\"http://www.onlineoff.ch", $inhalt); $inhalt = str_replace("act_main.cfm", "act_main.cfm?$urltoken", $inhalt); */ $inhalt = str_replace("http://www.onlineoff.ch/", "/", $inhalt); $inhalt = str_replace("https://www.onlineoff.ch/", "/", $inhalt); echo $inhalt; ?>