-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
52 lines (39 loc) · 1.64 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
use Starlight\HTTP\HTTPS;
use Starlight\HTTP\Router;
require_once __DIR__ . '/starlight/HTTP/Router.php';
require_once __DIR__ . '/starlight/HTTP/HTTPS.php';
if (!file_exists(__DIR__ . '/settings.php')) {
echo '<h1>Error 503</h1><p>The server is temporarily unavailable.</p><p><sub>Error: Missing settings.php</sub></p>';
exit;
}
$HTTPS = new HTTPS();
$HTTPS->RedirectToHTTPS();
$Router = new Router();
// Plugins
$Router->route('/plugin', '/Views/Assets.php');
$Router->route('/plugin/essence', '/Views/Asset.php');
$Router->route('/plugin/kryptonite', '/Views/Asset.php');
// Modpacks
$Router->route('/modpack', '/Views/Assets.php');
$Router->route('/modpack/galactica', '/Views/Asset.php');
$Router->route('/modpack/lews-jurassic-pack', '/Views/Asset.php');
$Router->route('/modpack/lews-client-pack', '/Views/Asset.php');
$Router->route('/modpack/simplyaesthetic', '/Views/Asset.php');
// Mods
$Router->route('/mod', '/Views/Assets.php');
// Servers
$Router->route('/server', '/Views/Assets.php');
// API
$Router->route('/api/modrinth', '/API/Modrinth.php');
$Router->route('/api/curseforge', '/API/CurseForge.php');
$Router->route('/api/lewmc', '/API/LewMC.php');
// News
$Router->route('/news', '/Views/News.php');
$Router->route('/news/2024-05-24-thank-you-for-10000-downloads', '/Views/News/2024-05-24.php');
$Router->route('/news/2023-02-20-galactica-distribution-update', '/Views/News/2023-02-20.php');
$Router->route('/news/2023-02-17-galactica-community-server-lag-updates', '/Views/News/2023-02-17.php');
// Other
$Router->route('/', '/Views/Homepage.php');
$Router->route('/discontinued', '/Views/Discontinued.php');
echo 'Error 404';