From 9b8e234c6c9ae545df3788c0603a5dd97ffc62b4 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Mon, 20 Jun 2016 22:41:47 +0200 Subject: support php internal webserver --- index.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index eeaca82..2d6a575 100644 --- a/index.php +++ b/index.php @@ -28,7 +28,23 @@ require_once('model/Upcoming.php'); ob_start(); try { - $route = @$_GET['route']; + if(isset($_GET['htaccess'])) + { + $route = @$_GET['route']; + } + elseif(isset($_SERVER["REQUEST_URI"])) + { + $route = ltrim(@$_SERVER["REQUEST_URI"], '/'); + + // serve static + if($route != '' && file_exists($_SERVER["DOCUMENT_ROOT"].'/'.$route)) + { + return false; + } + + } + else $route = ''; + $route = rtrim($route, '/'); // generic template -- cgit v1.2.3