The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Content negotiating, Error: 406 Not Acceptable
post Nov 23 2006, 03:55 PM
Post #1


Group: Members
Posts: 97
Joined: 24-October 06
Member No.: 549

There are some script that validate web-pages. Used by few top Russian search web-sites. There, page 'index' is not acceptable (406) but page index.html is ok. Why so? Is it correct? How about content negotiating?

error 406 --
good one --

Basic question: is this script good or not? If yes, what should I do with this 406?

Thank in advance,

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Reply to this topicStart new topic
Liam Quinn
post Nov 23 2006, 10:27 PM
Post #2

WDG Founder

Group: Root Admin
Posts: 52
Joined: 2-August 06
From: Canada
Member No.: 1

The 406 error is something that you should correct. Right now, a browser that sends "Accept: text/html" gets a 406 error from :

$ curl --head -H 'Accept: text/html'
HTTP/1.1 406 Not Acceptable
Date: Fri, 24 Nov 2006 03:18:11 GMT
Server: Apache
Alternates: {"index.html" 1 {type application/x-httpd-php} {length 1753}}
Vary: negotiate
TCN: list
Content-Type: text/html; charset=iso-8859-1

It looks like your server thinks that index.html is application/x-httpd-php instead of text/html. You probably have a directive like this in your Apache configuration:

AddType application/x-httpd-php .html

You should replace that with

AddHandler php5-script .html

for PHP5, or

AddHandler php-script .html

for PHP4.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


- Lo-Fi Version Time is now: 28th January 2020 - 05:39 AM