MAPG-7 redirect / to /game

This commit is contained in:
Bence Pőcze 2020-05-20 13:06:40 +02:00
parent 2c9a3ec23c
commit 0bf93f7509

View File

@ -3,6 +3,7 @@
require '../main.php';
// very basic routing
$host = $_SERVER["REQUEST_SCHEME"] . '://' . $_SERVER["SERVER_NAME"];
$url = $_SERVER['REQUEST_URI'];
switch($url) {
case '/game':
@ -11,6 +12,9 @@ switch($url) {
case '/getNewPosition.json':
$controller = new MapGuesser\Controller\GetNewPosition();
break;
case '/':
header('Location: ' . $host . '/game', true, 302);
die;
default:
echo 'Error 404';
die;