1<?php 2 3/** 4 * @var array<string> $bad_user_agents 5 * @var string $base_path 6 * @var string $base_url 7 * @var string $sitemap_url 8 */ 9 10?> 11# robots.txt for <?= $base_url ?> 12 13<?php if ($base_path !== '') : ?> 14# CAUTION! This robots.txt needs to be copied to the root folder. 15<?php endif ?> 16 17<?php foreach ($bad_user_agents as $bad_user_agent): ?> 18User-agent: <?= $bad_user_agent ?> 19 20<?php endforeach ?> 21Disallow: / 22 23User-agent: * 24Disallow: <?= $base_path ?>/admin 25Disallow: <?= $base_path ?>/manager 26Disallow: <?= $base_path ?>/editor 27Disallow: <?= $base_path ?>/account 28Crawl-delay: 10 29 30<?php if ($sitemap_url !== '') : ?> 31Sitemap: <?= $sitemap_url ?> 32<?php endif ?> 33