-1

This is a question about configuring Apache and accept headers.

I am trying to login to Superuser with OpenID, and it generates a request like this:

telnet phor.net 80
GET /professional HTTP/1.0
Accept:text/html,application/xhtml+xml,application/xrds+xml` 

And my Apache server gives the error:

406 Not Acceptable: 
An appropriate representation of the requested resource /professional 
could not be found on this server. Available variants: 
professional.php, type  application/x-httpd-php

If a normal web browser hits the site, content negotiation correctly selects professional.php as the resource for this request. Is it possible to serve this same file to superuser?

2 Answers 2

2

Did you try adding application/x-httpd-php to the accept portion of your request?

1
  • Yes, that fixes the problem. But I cannot control the client's (Superuser.com) request, I can only control my server's response. Sep 13, 2010 at 22:21
1

Solution

AddType text/html php 

In my /etc/apache2/sites-enabled/*

Not the answer you're looking for? Browse other questions tagged .