I have been wondering how i can make ajax request without using the .php file extension for security purpose. for instance were i want to send request to users/main/accept.php but i want to remove .php so i can have something like users/main/accept but is not working how can i do this because i know is possible.
$(".accept_form").on("submit",function(event){
event.preventDefault();
var data = $(this).children("input[type=hidden]").val();
//alert(data);
$.ajax({
type:'post',
url:'users/main/accept',
data:{data:data},
error:function(){
alert("error fetching data");
},
success:function(response){
}
});