diff --git a/index.php b/index.php index a333e59..f2de267 100644 --- a/index.php +++ b/index.php @@ -36,7 +36,14 @@ require_once $abs_path . "/php/controller/index-controller.php"; include_once 'includes/navbar.php'; //Dynamischer Inhalt: if (isset($_GET["pfad"])) { - if (file_exists($abs_path . '/content/' . $_GET["pfad"] . '.php')) { + + if ($_GET["pfad"] === "search-results") { + if (file_exists($abs_path . '/php/controller/search-results-controller.php')) { + include_once $abs_path . '/php/controller/search-results-controller.php'; + } + } + + if (file_exists($abs_path . '/content/' . $_GET["pfad"] . '.php')) { include_once $abs_path . '/content/' . $_GET["pfad"] . '.php'; } else { include_once $abs_path . '/content/404.php'; diff --git a/php/controller/search-results-controller.php b/php/controller/search-results-controller.php index 0bc8588..241f2c2 100644 --- a/php/controller/search-results-controller.php +++ b/php/controller/search-results-controller.php @@ -22,8 +22,6 @@ if ($_SERVER["REQUEST_METHOD"] === "GET" && isset($_GET["q"])) { $_SESSION["message"] = "internal_error"; } } - header("location: ../../index.php?pfad=search-results"); - exit(); }