seo bullshit

This commit is contained in:
lolcat committed 2026-12-01 18:55:57 -05:00
1 parent f2fe2a5ba6
commit fe964b5f98
2 files changed
+45 -12

No files matched your search

+4 -1
View File
@@ -19,5 +19,8 @@ Disallow: /videos
Disallow: /news Disallow: /news
Disallow: /music Disallow: /music
Disallow: /proxy Disallow: /proxy
Disallow: /api/v1/ac Disallow: /resolver
Disallow: /api/
Allow: / Allow: /
Sitemap: https://4get.ca/sitemap
+41 -11
View File
@@ -3,33 +3,63 @@
header("Content-Type: application/xml"); header("Content-Type: application/xml");
include "data/config.php"; include "data/config.php";
$domain = $host = strtolower(explode(":", $_SERVER["HTTP_HOST"], 2)[0]);
htmlspecialchars(
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? "https" : "http") . // detect if 4get should serve the HTTPS endpoint
'://' . $_SERVER["HTTP_HOST"] if(
); preg_match(
'/\.(onion|i2p)$/',
strtolower($host),
$match
)
){
$ssl = false;
$src = $match[1];
}elseif(
is_string(
filter_var(
$host,
FILTER_VALIDATE_IP
)
) ||
$host == "localhost"
){
$ssl = false;
$src = "localhost";
}else{
$ssl = true;
}
$domain = ($ssl ? "https" : "http") . "://" . $_SERVER["HTTP_HOST"];
echo echo
'<?xml version="1.0" encoding="UTF-8"?>' . '<?xml version="1.0" encoding="UTF-8"?>' .
'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' .
'<url>' . '<url>' .
'<loc>' . $domain . '/</loc>' . '<loc>' . htmlspecialchars($domain) . '</loc>' .
'<lastmod>2023-07-31T07:56:12+03:00</lastmod>' . '<lastmod>2023-07-31T07:56:12+03:00</lastmod>' .
'</url>' . '</url>' .
'<url>' . '<url>' .
'<loc>' . $domain . '/about</loc>' . '<loc>' . htmlspecialchars($domain) . '/settings</loc>' .
'<lastmod>2023-07-31T07:56:12+03:00</lastmod>' . '<lastmod>2023-07-31T07:56:12+03:00</lastmod>' .
'</url>' . '</url>' .
'<url>' . '<url>' .
'<loc>' . $domain . '/instances</loc>' . '<loc>' . htmlspecialchars($domain) . '/instances</loc>' .
'<lastmod>' . date('Y-m-d\TH:i:sP') . '</lastmod>' .
'</url>' .
'<url>' .
'<loc>' . htmlspecialchars($domain) . '/api.txt</loc>' .
'<lastmod>2023-07-31T07:56:12+03:00</lastmod>' . '<lastmod>2023-07-31T07:56:12+03:00</lastmod>' .
'</url>' . '</url>' .
'<url>' . '<url>' .
'<loc>' . $domain . '/settings</loc>' . '<loc>' . htmlspecialchars($domain) . '/about</loc>' .
'<lastmod>2023-07-31T07:56:12+03:00</lastmod>' . '<lastmod>2023-07-31T07:56:12+03:00</lastmod>' .
'</url>' . '</url>' .
'<url>' . '<url>' .
'<loc>' . $domain . '/api.txt</loc>' . '<loc>' . htmlspecialchars($domain) . '/donate</loc>' .
'<lastmod>2023-07-31T07:56:12+03:00</lastmod>' . '<lastmod>2026-00-31T07:56:12+03:00</lastmod>' .
'</url>' . '</url>' .
'</urlset>'; '</urlset>';