How can I disable mod_security in .htaccess file?

后端 未结 7 1669
盖世英雄少女心
盖世英雄少女心 2020-12-02 22:42

How can we disable mod_security by using .htaccess file on Apache server?

I am using WordPress on my personal domain and posting a post whi

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 23:32

    On some servers and web hosts, it's possible to disable ModSecurity via .htaccess, but only in its entirety – you can't disable individual rules.

    Rather than disabling it for your entire site, it's best to limit this to specific URLs. You can specify which URLs to match via the regex in the statement below...

    ### DISABLE mod_security firewall
    ### Some rules are currently too strict and are blocking legitimate users
    ### We only disable it for URLs that contain the regex below
    ### The regex below should be placed between "m#" and "#" 
    ### (this syntax is required when the string contains forward slashes)
    
      
        SecFilterEngine Off
        SecFilterScanPOST Off
      
    
    

提交回复
热议问题