Mar 15 2007
Last update:

406 Error (Not Acceptable) An appropriate representation of the requested resource could not be found on this server

Filed under: Operating Systems » Linux,

406 Error (Not Acceptable)

Are you seeing this error when trying to access a page? This is due to Apache mod_security that is turned on by default. While you can use the following to diagnose the problem (turning the filter off should resolve the issue):

SecFilterEngine off

It's important to leave the filter on as it helps prevent spam and injection attacks. What you need to do is figure out (ask your hosting provider if you need help) the phrases that are triggering the filter. Typically these will include phrases that include possible commands such as "ftp," "telnet," "ssh," etc. Once you know which ones are, you can modify the filter to permit the page that is not loading (scan your logs or Google sitemap for 406 errors to find all the pages experiencing this problem):

SecFilterEngine On
SecFilterSelective "POST_PAYLOAD" "allow these words" "allow,nolog"
Your rating: None Average: 2.5 (40 votes)

Need to Organize? Visit (Affiliate)

Your rating: None Average: 2.5 (40 votes)
Email this page PDF of this page Print this page
Leave a comment

406 - Not Acceptable

What an annoying error! Not an acceptable representation of this resource...WTF? Why oh why can't engineers put things into English the first time. It shouldn't be up to the thousands of web designers/ developers out there to restate error message in hundreds of different ways if a little upfront effort by the initial engineers could make things easier for all of us! Right? 

406 error and secfilter

The SECFilter command is useful in disabling the 406 error, but be careful with what you let through. As the article mentions, I would target specific file patterns and URL's. Letting everything through is too much of a security risk (that's why SECFilter was implemented by Apache in the first place).

So a 406 error is specific to

So a 406 error is specific to Apache servers? Can't one get the error otherwise?

406 error on other servers

Good question. I believe the 406 error is not specific to any server, but Apache has its own way of handling the error. On IIS, for example, the error might display differently, depending on how it is handled.

Please help me......

hello. last day it was ok... but from today it shows this 406 error. please help me how to solve this problem.


A good logo...

But a good logo doesn't have to cost a fortune, and you don't even need to hire a professional design team.

406 Error Fix

If your Host Server is throwing back this error then a simple page refresh - using the html code below on your 406 error page will correct the issue: <HEAD> <META HTTP-EQUIV=REFRESH CONTENT=1> </HEAD>

Can you tell more about SecFilterEngine On..

i wanna use this "SecFilterEngine on" but still cannot loading the pages correctly.. is there any code to solve this problems? I mean use "SecFilterEngine On" but can load any webpages correctly?

The content of this field is kept private and will not be shown publicly.

We use this trick question to try and prevent automated spam comments.