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