如何在 .htaccess 文件中禁用 mod_security? [英] How can I disable mod_security in .htaccess file?
问题描述
如何在Apache服务器上使用.htaccess
文件禁用mod_security
?
How can we disable mod_security
by using .htaccess
file on Apache server?
我在我的个人域上使用 WordPress 并发布了一个帖子,其中内容有一些代码块,并且根据我的托管服务提供商的说法,mod_security
给出了一个错误,我的 IP 由于 mod_security
.
I am using WordPress on my personal domain and posting a post which content has some code block and as per my hosting provider said mod_security
gives an error and my IP has gone into firewall because of mod_security
.
所以我想通过使用 .htaccess
文件禁用 mod_security
.
So I want to disable mod_security
by using .htaccess
file.
推荐答案
这样做是可能的,但很可能您的主机出于某种原因实施了 mod_security
.确保他们同意您为自己的网站禁用它.
It is possible to do this, but most likely your host implemented mod_security
for a reason. Be sure they approve of you disabling it for your own site.
也就是说,应该这样做;
That said, this should do it;
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
这篇关于如何在 .htaccess 文件中禁用 mod_security?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!