httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt <>
Subject [users@httpd] Multiviews + PHP --> 406 for MSNbot, Googlebot. Content-type for .php files not appropriate to their content.
Date Sun, 15 Aug 2004 21:48:58 GMT

I'm using Multiviews with my URLs. Most of the files are PHP scripts  
returning text/html, though not all. The Content-Type header is set within  
the PHP using this:
  header("Content-Type: text/html; charset=utf-8");

MSNbot and GoogleBot receive 406 responses: for the URL for example, from a log (with the  
Accept header shown):
"GET /contact HTTP/1.0" "text/html" 406 "msnbot/0.11  
"GET /contact HTTP/1.0" "text/html,text/plain" 406 "Googlebot/2.1  

This is apparently the problem:

HEAD /contact HTTP/1.1
Accept: text/html

HTTP/1.1 406 Not Acceptable
Date: Sun, 15 Aug 2004 21:33:06 GMT
Server: Apache/2.0.50 (Unix) PHP/4.3.8-dev
Alternates: {"contact.php" 1 {type application/x-httpd-php} {length 1388}}
Vary: negotiate
TCN: list
Content-Type: text/html; charset=iso-8859-1

Apache sees the contact.php file and 'knows' it is  
application/x-httpd-php. But in fact it returns (in this case) text/html.  
How do I tell Apache this?

Here's a few lines from the config file:

<Directory /home/*/public_html>
     AllowOverride None
     Options MultiViews Indexes SymLinksIfOwnerMatch Includes

DirectoryIndex index.html index.php index.html.var index.cgi index

TypesConfig conf/mime.types

DefaultType application/octet-stream

<IfModule mod_mime_magic.c>
     MIMEMagicFile conf/magic

There are a couple of other problems, but these are most likely directly  
related anyway.

Thanks everyone :)


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message