-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.php
34 lines (30 loc) · 1.09 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
header("Content-Type: text/html");
include dirname(__FILE__) . '/includes/AltoRouter.php';
// Set platformToggle to default to false
$platformToggle = false;
$router = new AltoRouter();
$router->setBasePath('');
/* Setup the URL routing. This is production ready. */
// Main routes that non-customers see
$router->map('GET','/', 'home.php', 'home');
$router->map('GET','/home', 'home.php', 'home-home');
$router->map('GET','/photoshop', 'photoshop.php', 'photoshop');
$router->map('GET','/illustrator', 'illustrator.php', 'illustrator');
$router->map('GET','/indesign', 'indesign.php', 'indesign');
$router->map('GET','/css-selectors', 'css-selectors.php', 'css-selectors');
$router->map('GET','/git', 'git.php', 'git');
$router->map('GET','/vim', 'vim.php', 'vim');
$router->map('GET','/markdown', 'markdown.php', 'markdown');
$router->map('GET','/chrome', 'chrome.php', 'chrome');
$router->map('GET','/sketch', 'sketch.php', 'sketch');
/* Match the current request */
$match = $router->match();
if($match) {
require $match['target'];
}
else {
header("HTTP/1.0 404 Not Found");
require '404.php';
}
?>