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

if (setting('seo_noindex') === '1') {
    echo "User-agent: *\nDisallow: /\n";
    exit;
}

echo "User-agent: *\n";
foreach (['/admin/', '/sepet', '/odeme', '/hesabim', '/siparislerim', '/siparis/', '/favorilerim', '/giris', '/kayit', '/arama'] as $path) {
    echo "Disallow: $path\n";
}
echo "\nSitemap: " . url('sitemap.xml') . "\n";
echo setting('robots_extra', '');
