I have this piece of code
$.get('/proc.php?proc=get_color', function(data){
$('#offer_color').html(data);
});
that is hosted on an https. Now when I request this page its saying 404 Error in the console but in the Firebug console it returns what its suppose to for example “DATA IS OK”.
Does anyone have any idea why it says 404 error while in fact its returning its value from the remote php file?
It is not allowing me to do anything with the result as its displaying “Error” when I alert it.
In the proc file
include('wp-blog-header.php');
global $db;
echo 'Data is Ok'
I need the WP things to connect to the WP Database
Sounds like your script,
proc.php, or one that it includes is setting a 404 header. I see from your comments that you calling in a WordPress file – perhaps this is trying to resolve the supplied URL, failing and then issuing a 404 header before your code inproc.phpis even evaluated.After a quick search on Google it looks like this common problem and there are a couple of blog posts out there that deal with working around the issue:
It looks like the answer is to replace according to a post on the WordPress Forums:
with: