I’ve just moved a site to live and am getting a 406 Not Acceptable error when using jquery to make an ajax request to a php script. I don’t get the error on my test server so I’m just trying to figure out the correct way to fix this. The AJAX request is as follows, and expects JSON response, while my php script is just echoing out with json_encode().
$.ajax({
type: "POST",
contentType: "application/json",
data: "{}",
url: "server/php/progress.php",
dataType: "json",
here’s the crux of my php script (have also tried without the header setting):
header('Content-type: application/json');
echo json_encode($val); exit;
Any thoughts on what should be done to fix this? htaccess directives?