I am doing a ajax call , but its giving a error saying 404 file not found.
$.ajax({
type : 'POST',
url : 'app/lib/functions.php',
data : data,
success : function(data) {
}
});
My project struc is this
I am doing a ajax call from main.js (in public fodler) to functions.php (in app folder). Please help. I am tired of this. Edited : I tried with ../ and ../../ in front of the url in ajax but it does not work. I think its something to do with app folder , as this folder is not available to client side , something like that. I dont know how to do the ajax now. My .htaccess has this code as I am redirecting to public folder by default.
RewriteEngine On
RewriteBase /proj_name/
RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]
RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
EDIT : If I remove the .htaccess , '../app/lib/functions.php' path works
