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.
我在 .htaccess 中输入了以下代码:
<Directory ./folder> deny from all </Directory>
但是我在所有网站文件夹中都收到“内部服务器错误”。
我的代码有什么问题?
您收到 500 错误,因为.htaccess 中不允许使用ApacheDirectory 指令。您只需要在 Apache 配置中使用httpd.conf。
Directory
httpd.conf