您可以通过创建一个替代目录来保护或隐藏您的 /administrator 目录,该目录设置一个发送到请求中的 http 标头的 cookie。该 cookie 将从 /administator 目录中的 index.php 文件进行验证,如果未验证(当未经授权的用户想要通过已知的 /administrator 目录检测您的站点是否基于 Joomla 时),那么它将被重定向到您网站的根目录。
这些是步骤。
*创建一个替代的 /administrator 目录,即:/admins_place
*在 /admins_place 中,使用以下代码片段创建一个 index.php
<?php
$admin_cookie_code = "_hashed_secret_code_here_";
setcookie("JoomlaAdminSession", $admin_cookie_code, 0, "/");
header("Location: ../administrator/index.php");
?>
*在管理员目录中,在 index.php 文件的开头添加此代码片段。
<?php
if($_COOKIE['JoomlaAdminSession'] != "_hashed_secret_code_here") {
header("Location: ../index.php");
}
我希望这有帮助