Use ajax/json in yii framework
问题 Im trying to make a webshop in Yii framework. Now i want to unset a session when a user clicks on a icon. I currently have it working that is sends a json call to a file, but the url in the json call is being rewrited by my htaccess i think. JSON call: $(document).ready(function(){ $('.glyphicon-trash').click(function(){ $.getJSON("ajax/load.php?action=unset&element="+$(this).parent(), function(data) { alert(data.message); }); }); }); Error i get: GET http://mydomain.nl/my/path/to/site/ajax