From 2d22d14817ce9e5e8c8d13205c998616dc8a7d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Mon, 25 May 2020 18:52:31 +0200 Subject: [PATCH] MAPG-47 make possible to pass GET parameters to URL --- public/index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/index.php b/public/index.php index ee4c162..8be460c 100644 --- a/public/index.php +++ b/public/index.php @@ -5,6 +5,9 @@ require '../main.php'; // very basic routing $host = $_SERVER["REQUEST_SCHEME"] . '://' . $_SERVER["SERVER_NAME"]; $url = $_SERVER['REQUEST_URI']; +if (($pos = strpos($url, '?')) !== false) { + $url = substr($url, 0, $pos); +} switch($url) { case '/game': $controller = new MapGuesser\Controller\GameController();