How to disable mod security using htaccess file?

Mod_security is an apache module that helps to protect your website from various attacks.
It is used to block commonly known exploits by use of regular expressions and rule sets.

Nowadays many hosting providers use their own mod security rules on the server, so users don't need to apply their own security mod.
Mis configuration & using of Mod Security in your hosting may cause the error 403, 404 or 500, which is nothing but mis matching of your mod scurity rules with server rules. 

Mod_security can be easily disabled with the help of .htaccess. Here's the code that you will need to enter in .htaccess file to disable mod security.

  SecFilterEngine Off
  SecFilterScanPOST Off
  • mod security, off mod security, htaccess
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to configure your domain email on Gmail app ?

Log in to cPanel using your username and your cPanel password at,...

How to Connect to the MYSQL Database Remotely?

Allowing remote MYSQL connections is often done to enable a program on your personal computer to...

Prevent Brute Force Attacks in WordPress

A brute force attack is a trial-and-error method in which the hackers aim to gain access to a...

How to fix failed to retrieve directory listing error in FileZilla FTP?

When using FileZilla to connect to your FTP if you encounter an error like this: Status:...

How To Fix 500 Internal Server Error in WordPress?

In this article, we will show you how to fix the internal server errors in WordPress. The...