diff options
author | MaZderMind | 2016-06-20 22:41:47 +0200 |
---|---|---|
committer | MaZderMind | 2016-06-20 22:41:47 +0200 |
commit | 9b8e234c6c9ae545df3788c0603a5dd97ffc62b4 (patch) | |
tree | 448c21748ff9a9db0a2e71b04f1e1355c5447b09 /index.php | |
parent | 37554e5112397ee0f3565e3bcece2f4149ccd3df (diff) |
support php internal webserver
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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 |