URL Alias For Editor Tables
URL Alias For Editor Tables
Niko@1966
Posts: 17Questions: 8Answers: 3
Is their an easy way to create an alias for an editor table URL that still allows the ajax to work. I tried doing it through .htaccess but the ajax stops working. The alias part works but the ajax stops working and I get no data back.
Answers
Both the Datatables
ajax
and Editorsajax
use jQuery's $.ajax](https://api.jquery.com/jQuery.ajax/) method. There isn't anything special you have to do with Datatables or Editor. Without seeing what you are doing its hard to offer suggestions.I would start debugging by using the browser's network inspector. What is the response status code?
Does the URL in the Aajx request match any of the routes configured in the web server?
Can you provide a link to your page or a. test case showing the issue so we can help debug?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
My guess is that your alias is changing the path depth, and the URL for the Ajax request is relative. Make it absolute by including the full path - e.g.
/api/data
, rather than../api/data
(or whatever it is).Allan