MAPG-7 redirect / to /game
This commit is contained in:
parent
2c9a3ec23c
commit
0bf93f7509
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user