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