I'm using Jquery ajax to call a CodeIgniter function:
$.ajax({
type: "POST",
dataType:'json',
beforeSend: function() {
$("#opc").addClass("opacity");
$("#searching").show();
},
url: "<?php echo base_url(); ?>search/get_results",
data: {
'ns_pos':ns_pos,
'NSPlaceDomainID':activity,
'DistrictID':area,
'NSAssociationID':referer,
'Title':text,
'SettlementID':settlement,
'NoOpinion':$("input[name=NoOpinion]").is(":checked"),
'SpecialCharacteristics':ns_attr
}
etc...
In the Chrome console I get the message:
POST http://mattat.org.il/ci/index.php/search/get_results 404 (Not Found)
the response preview is:
Not Found
The requested URL /ci/index.php/search/get_results was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
However, this function does exist, as is evident when I simply paste the link in the URL line.
I'm confused...
edit: Following @paul's constructive comment I have changed the request to GET and, indeed, the page was found. What can cause such an obscure behaviour?
One more step: When I empty the data object (like so: data: {}), the function is found even with POST request