From c9d413136b7e7a9bc9850b3d7694a3e5b4fc2fd6 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Wed, 27 Jul 2016 02:19:29 +0200 Subject: [PATCH] Redirect index.php to root (fixes #60) --- index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.php b/index.php index 3419c5c..e9cee6f 100644 --- a/index.php +++ b/index.php @@ -16,6 +16,11 @@ require_once __DIR__.'/vendor/autoload.php'; use Alltube\VideoDownload; 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(); $container = $app->getContainer(); $container['view'] = function ($c) {