Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我搜索了一下,我想出了deny from all,但是当我把它放在ftp上时它不起作用;但在本地主机上它的工作。
deny from all
我在上传文件夹中编写了以下给定代码:
# .htaccess mod_rewrite RewriteEngine On deny from all
解决:
只需将 index.php 文件放入包含代码的文件夹中:
<?php header("Location: ../"); ?>
它将通过用户退出该文件夹。