【发布时间】:2015-11-23 21:24:18
【问题描述】:
我正在使用共享主机(apache、php、wordpress),并且在尝试阻止访问 .htaccess 和 wp-config 时,我得到了
错误 500 - 内部服务器错误
我所做的是将这些放入 .htaccess:
# protect the wp-config file
<files wp-config.php>
Order allow, deny
Deny from all
</files>
# Prevent access to .htaccess
<Files .htaccess>
Order allow, deny
Deny from all
</Files>
这就是我的 .htaccess 中的全部内容。
我遵循了大多数显示这一点的网站中的示例。
如果我扫订单:
Order deny,allow
Deny from all
没有内部错误,但这不是我在大多数网站指南中看到的。 如果有人知道为什么以及使用什么。
【问题讨论】:
-
500/内部错误总是伴随着网络服务器
error.log中更详细的消息。 -
无日志。有,我删除它并再次调用我的网站-那里什么都没有(.htaccess 中的相同根目录)