如何在 .htaccess 文件中禁用 mod_security? [英] How can I disable mod_security in .htaccess file?

查看:25
本文介绍了如何在 .htaccess 文件中禁用 mod_security?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆