Don't redirect to REQUEST_URI when browsing to index.php

Instead, we can make sure everything works correctly on index.php
This commit is contained in:
Pierre Rudloff 2022-02-20 13:28:57 +01:00
parent cf82f1cc8f
commit bc14b6e45c
3 changed files with 22 additions and 6 deletions

View file

@ -5,11 +5,6 @@ require_once __DIR__ . '/vendor/autoload.php';
use Alltube\App;
use Alltube\ErrorHandler;
if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '/index.php') !== false) {
header('Location: ' . str_ireplace('/index.php', '/', $_SERVER['REQUEST_URI']));
die;
}
try {
// Create app.
$app = new App();