robots.txtの追加

This commit is contained in:
2026-03-19 04:24:24 +09:00
parent a1bd29cff6
commit 119f9f48b6
2 changed files with 10 additions and 0 deletions

View File

@@ -157,6 +157,15 @@ denyaccess:
}
}
public function robots(array $params): void {
$txt = "User-Agent: *\nDisallow: /login/\nDisallow: /register/";
$tmpFile = tempnam(sys_get_temp_dir(), 'tmpl_');
file_put_contents($tmpFile, $txt);
include $tmpFile;
unlink($tmpFile);
}
//------------------------------------------
// 機能性
//------------------------------------------