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;
}
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
Just for people having the same problem (just spend a few hours)
Make sure the path to the file you include is correct;
Isf so, add a header 200 status right after it.