$x = $_SERVER["QUERY_STRING"]; if ($x != "") { //$y = "Location: http://".$_SERVER['SERVER_NAME']."/livestreams.php?str=".$x; $y = "Location: https://video.nti.sk/live/?".$x; } else $y = "Location: https://".$_SERVER['SERVER_NAME']."/livestreams.php"; header($y); ?>