diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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'); } |