prepareQuery(); $table = $config->sql_tablename_publish_de(); $shortcode = strtolower(trim($func->stripHtml($_REQUEST['c']))); $stmt = $pdo->prepare("SELECT p_isonline FROM $table WHERE p_shortcode=:shortcode LIMIT 1"); $stmt->bindValue(':shortcode', $shortcode, PDO::PARAM_STR); $stmt->execute(); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); $p_isonline = trim($rows[0]["p_isonline"]); if (strpos($p_isonline, '1') !== FALSE){ // dauerhafte PHP-Weiterleitung (Statuscode 301) $linkingcode = "https://www.buzzerstar.com/".$func->makeArticleLink($shortcode); header("HTTP/1.1 301 Moved Permanently"); header("Location: $linkingcode"); } else { header("HTTP/1.1 301 Moved Permanently"); header("Location: https://www.buzzerstar.com/?redirect=ARTICLE_NOT_ONLINE&rel_shortcode=$shortcode"); } $stmt = null; // doing this is mandatory for connection to get closed $pdo = null; exit(0); ?>