We Rock Your Web in the Press!

Why Do I Keep Getting this Error: 406 Error (Not Acceptable)?

Home Forums Tech Web Development Why Do I Keep Getting this Error: 406 Error (Not Acceptable)?

Post a New Topic

This topic contains 8 replies, has 4 voices, and was last updated by  Guest 3 months, 3 weeks ago.

  • Author
    Posts
  • #13940

    parley136
    Member

    Why do I keep getting this error when I try to access a page?

  • #13942

    Alex Schenker
    Keymaster

    406 Error (Not Acceptable)
    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"

  • #13953

    Guest
    Participant

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

  • #13952

    Guest
    Participant

    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:



  • #13943

    Guest
    Participant

    Hello, yesterday it was ok… but from today it shows this 406 error. Please help me solve this problem.

    Thanks
    Mehedi

  • #13946

    Guest
    Participant

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

    • #13947

      Alex Schenker
      Keymaster

      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.

  • #13954

    Guest
    Participant

    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).

  • #13951

    Guest
    Participant

    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?

You must be logged in to reply to this topic.