aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorMaZderMind2016-06-20 22:41:47 +0200
committerMaZderMind2016-06-20 22:41:47 +0200
commit9b8e234c6c9ae545df3788c0603a5dd97ffc62b4 (patch)
tree448c21748ff9a9db0a2e71b04f1e1355c5447b09 /index.php
parent37554e5112397ee0f3565e3bcece2f4149ccd3df (diff)
support php internal webserver
Diffstat (limited to 'index.php')
-rw-r--r--index.php18
1 files changed, 17 insertions, 1 deletions
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