1<?php
2
3$request = $_SERVER['REQUEST_URI'];
4
5switch ($request) {
6 case '/' :
7 require __DIR__ . '/views/index.php';
8 break;
9 case '' :
10 require __DIR__ . '/views/index.php';
11 break;
12 case '/about' :
13 require __DIR__ . '/views/about.php';
14 break;
15 default:
16 http_response_code(404);
17 require __DIR__ . '/views/404.php';
18 break;
19}