<?php
header('Content-Type: application/xml; charset=utf-8');

// Base URL dynamisch ermitteln
$scheme  = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https" : "http";
$host    = $_SERVER['HTTP_HOST'];
$baseUrl = $scheme . "://" . $host;

echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

  <sitemap><loc><?= $baseUrl ?>/sitemap_posts.xml</loc></sitemap>
  <sitemap><loc><?= $baseUrl ?>/sitemap_images.xml</loc></sitemap>
  <sitemap><loc><?= $baseUrl ?>/sitemap_categories.xml</loc></sitemap>
  <sitemap><loc><?= $baseUrl ?>/sitemap_custom.xml</loc></sitemap>
  <sitemap><loc><?= $baseUrl ?>/sitemap_events.xml</loc></sitemap>
  <sitemap><loc><?= $baseUrl ?>/sitemap_authors.xml</loc></sitemap>
  <sitemap><loc><?= $baseUrl ?>/sitemap_static.xml</loc></sitemap>

</sitemapindex>

