I am working with codeigniter and jquery ajax. I'm having some incosistencies b/w my app locally on wamp (working perfectly) and my deployed app (not so much). Once possible suggested fix is to convert ajax relative paths to absolute paths for ajax, so it looks like:
url: "YOURBASEPATH/AjaxController/update",
location.href = "YOURBASEPATH/pan_controller/my_detail";
Here's my code right now:
$.ajax({a
type: "POST",
url: "AjaxController/update",
data:{ i : searchIDs, m : message },
dataType: 'json',
.done(function() {
alert("REFRESHING..");
location.href = "pan_controller/my_detail";
});
}
})
I have been using https://philsturgeon.uk/blog/2009/09/Asset-handling-in-CodeIgniter-with-the-BASE-tag for some time. Is this the same thing as having the base url hardcoded in ? if not how should I do this here without messing up other routes and the ability to deploy which are the advantage of relative routes.