Incorrect server response code – a non-404 is being reported as a 404

I’m trying to debug a WordPress video player theme which is using this standard AJAX request to populate a list of videos in a category:

function getdata(What) {
try {
    xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
    new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) {}
xmlhttp.onreadystatechange = ScreenWrite; 
xmlhttp.open("GET", What, true);
xmlhttp.send(null);
return false;

}

Read More

The request goes to this page, with a dynamic ID parameter:
http://www.hisfameministries.com/wp-content/themes/Video/list.php?id=44

If you visit that page, the list shows up fine, but when you try it on the live site, the server responds with the requested data, but says it’s a 404! Since it’s an error, the AJAX request fails to load the data onto the page (or so I assume).

Here’s the live site, for reference:
http://www.hisfameministries.com/sermons/

UPDATE:
Here’s list.php, as requested: http://pastie.org/1270724

Related posts

Leave a Reply

1 comment

  1. Just for people having the same problem (just spend a few hours)
    Make sure the path to the file you include is correct;

    <?php require($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php'); ?>
    

    Isf so, add a header 200 status right after it.

    require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');
    header('HTTP/1.1 200 OK');