<?php
$slhttp = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://';
$site_url = $slhttp . $_SERVER['HTTP_HOST'] . '/';
header('Content-Type: application/xml; charset=utf-8');
?>
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc><?php echo htmlspecialchars($site_url); ?>sitemap.php?type=main</loc>
    <lastmod><?php echo date('Y-m-d'); ?></lastmod>
  </sitemap>
</sitemapindex>
