Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Can we mute the default htaccess rule disabling mod_security so mod_sec works fully?
Not Solved
Hey there, we noticed a long time that the .htaccess file for the forum had a rule to disable mod_security. We thought it was inserted by the Google SEO plugin but the author of the plugin said that Google SEO doesn't add that. I take it that this is a standard/default .htaccess rule to avoid getting false positives from people uploading files when posting.

In our case, we don't allow most forum members to upload files so we would rather have mod_security working fully rather than keeping it disabled. Can we mute the rule (i.e. add # to every line of the rule) without affecting the forum at all, including the Google SEO plugin?

Below is the current .htaccess rule disabling mod_security, it's at the top of the .htaccess file and then it is followed by the rewrite rules of the Google SEO plugin.

Thanks for any help.

QUICK EDIT: we asked our web host and they said that mod_security was fully working despite the mod_security disabling rule and that it was blocking hundreds of hacking attempts per day. The forum is in a directory and the homepage is a standard WP installation, so maybe mod_security is working on the WP installation but not in the MyBB forum? Regardless, we'd like to know, as per above, if we can mute the rule so that mod_security is working fully on the forum. Thanks again.

Here's the mod_sec disabling rule:

Options -MultiViews +FollowSymlinks -Indexes

# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
# MediaTemple, it is known to cause random Internal Server
# errors. For MediaTemple, please remove the block below
<IfModule mod_security.c>
# Turn off mod_security filtering.
SecFilterEngine Off

# The below probably isn't needed, but better safe than sorry.
SecFilterScanPOST Off
Not Solved
Watching this, I'm pretty sure that rule is from MyBB's own 'Enable search engine friendly URLs?' Which is on Config under Server and Optimizations options but I'm not sure if Google SEO doesn't have that.
Not Solved
That rule is default for MyBB as a large number of hosts have broken ModSecurity implementations or configurations that can even prevent posting at all. You can remove that section if your host is configured correctly and ModSecurity doesn't cause any issues.

Forum Jump:

Users browsing this thread: 1 Guest(s)