Hello i am working on a PHP script and i am facing an issue that when i open the URL from browser it opens successfully but when try to make ajax request it gives me 404 Error. My Code is Following
jQuery.ajax({
url : "http://example.com/ajaxRequest/index.php",
method : "POST",
cache: false,
data : {
name : "Mohsin",
},
success : function(data){
alert(data);
},
});
Same URL opens in browser but gives 404 Error with ajax Request. i have also included
header('Access-Control-Allow-Origin: *');
in above script