Disable ModSec

The following snippet can be used to disable ModSec and certain ModSec Rules using .htaccess


Disable ModSec Completely

Disables ModSec for all locations within and beneath the current directory.
This will decrease your sites security!

<IfModule mod_security.c>
    SecRuleEngine Off
</IfModule>

Disable ModSec Rule

Whitelists and disables a single numbered ModSec Rule, ie rule 123456

<IfModule mod_security.c>
    SecRuleRemoveById 123456
</IfModule>


Supported By Cosmos Hosting