Namecheap LiteSpeed Problem when Posting data from html form

Viewed 133

I am facing a problem when trying to post data to my PHP from html form. The issue is as follows:

  1. When I submit less data like a 1 paragraph of Lorem Ipsum it works fine.
  2. Submitting more paragraphs it fails instantly with error 403 Forbidden.
  3. Tried solving using SecFilterScanPOST Off on .htaccess but to no avail.

Error message image

1 Answers

To solve this error, @qtwrk's comment is correct that you must use the following code in your .htaccess.

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

WordPress running on Litespeed Server will often fail with a 403 error when you try to post any content while creating new pages and posts in WP Admin. This code solves that issue.

Related