Redirect index.php to root (fixes #60)

This commit is contained in:
Pierre Rudloff 2016-07-27 02:19:29 +02:00
parent ed23275d27
commit c9d413136b

View file

@ -16,6 +16,11 @@ require_once __DIR__.'/vendor/autoload.php';
use Alltube\VideoDownload; use Alltube\VideoDownload;
use Alltube\Controller\FrontController; use Alltube\Controller\FrontController;
if (strpos($_SERVER['REQUEST_URI'], '/index.php') !== false) {
header('Location: '.str_ireplace('/index.php', '/', $_SERVER['REQUEST_URI']));
die;
}
$app = new \Slim\App(); $app = new \Slim\App();
$container = $app->getContainer(); $container = $app->getContainer();
$container['view'] = function ($c) { $container['view'] = function ($c) {