-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsitemap.php
45 lines (41 loc) · 924 Bytes
/
sitemap.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
<?php
// Constants.
CONST BASE_URL = "https://nibblepoker.";
const SITEMAP_LANGUAGES = ["", "en/", "fr/"];
const SITEMAP_PAGES = [
"",
"about/",
"content/",
"content/lscom-cli",
"content/lscom-cli-dotnet",
"content/youtube-auto-archiver",
"content/excel-worksheet-password-remover",
"content/mc-expanded-iron-bundles",
"content/dotnet-arguments",
"content/circuitpython-ebyte-e32",
"links/",
"contact/",
"privacy/",
];
// Retrieving the requested TLD.
switch($_SERVER['SERVER_NAME']) {
case "nibblepoker.lu":
$domain_tld = "lu";
break;
case "nibblepoker.com":
$domain_tld = "com";
break;
default:
http_response_code(400);
exit(1);
}
// Generating the sitemap.
foreach(SITEMAP_LANGUAGES as $language_key) {
foreach(SITEMAP_PAGES as $page_path) {
echo(BASE_URL . $domain_tld. "/" . $language_key . $page_path . "\r\n");
}
}
// Finishing the response.
//http_response_code(200);
exit(0);
?>