summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/index.php b/index.php
index 2781c7a..bb6cfa9 100644
--- a/index.php
+++ b/index.php
@@ -1,8 +1,12 @@
<?php
include('./includes/head.php');
-if (($post = strtok($_SERVER['REQUEST_URI'], '/')) && !empty($post)) {
+$page = strtok($_SERVER['REQUEST_URI'], '/');
+
+if (!empty($page) && $page == "posts" && ($post = strtok('/')) && !empty($post)) {
include("./posts/$post.php");
+} else if (!empty($page)) {
+ include("./pages/$page.php");
} else {
include('./includes/render_index.php');
}