So i have a lot of AJAX functions, they worked all well all good in server as well as in localhost until recently i made some changes in the js files and some ajax-php files as well. Nevertheless...they are still working absolutely fine on localhost...but not on server
During debugging, i found out...that the ajax has no problem getting the file....i mean there is no 404 error....however....it isn't passing the variable...
JS FILE
function nextImg(Imgkey){
changeImgViewerN = 0;
var currUrl = window.location.href;
var baseUrl = currUrl.split(/[\\/]/).pop();
var splitUrl = baseUrl.split('&');
var folderKey = splitUrl.pop();
var groupKey = splitUrl[0];
if(groupKey == undefined) groupKey = folderKey;
$.ajax({
url:'/9712d9c1_2be4d8c9318e69_1b526557b8_sF',
type: 'POST',
data:{searchNextImg:Imgkey, groupKey:groupKey, folderKey:folderKey},
success: function(response){
$('#in_folders').prepend(response);
}
})
}
PHP FILE
echo "Here";
if(isset($_POST['searchNextImg']) || isset($_POST['searchPrevImg'])) && isset($_POST['groupKey']) && isset($_POST['folderKey'])){
echo "Reading";
}
However on the server, it just executes echo "Here"; but not echo "Reading";
My .htaccess file says:
RewriteRule ^9712d9c1_2be4d8c9318e69_1b526557b8_sF$ http://www.example.com/ajaxinc/searchFile.php
There are such other AJAX functions but they are not passing variables to the server, however on localhost, they are working perfectly. All of them.