Temporarily Disable ModSecurity For Hostgator

by Gobala Krishnan on March 27, 2007

in Blogging Tips

If you’re hosted on Hostgator or any other host that use Modsecurity to protect their web server, you might notice some problems especially if you try to post something that has forbidden words / string in it. It seems the Hostgator modsecurity filter doesn’t allow some words in my previous post, so you’ll get HTTP 406 / Not Acceptable message (if you look at the http status header manually)

So what’s the best solution to rectify this without compromising your system security ? .. you can add the below lines into .htaccess to disable modsecurity when you try to post something to your blog :


The above lines means : If modsecurity is found, it’ll disable the filtering function. If modsecurity not found it’ll do no harm to your server

If you’re able to post to your blog successfully, you can remove the above lines from your .htaccess file or you can simply add # character before each line

Via : Reaper-X

VN:F [1.4.4_707]
Rating: 0.0/5 (0 votes cast)

Share This Post

{ 2 comments… read them below or add one }

1 UKMoneyPot May 20, 2007 at 7:00 pm

Would it not make sense to allow people to copy and paste that snippet?

It’s a very useful bit of code.

2 Kevin C. Nair June 10, 2007 at 3:01 pm

well yep, I try to put up the code in writing but….the code when missing….

it is just a short code..tho.. ;)

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post: Wordpress Plugin – Amazon Context Link Ads

Next post: Wordpress Themes – RockinSuckerfish2