Action not found after AJAX request
问题 Before for submitting I want to send the request to an action. But in return I get 404 not found . The action is obviously there. Also got it in the filters of the controller. JS: $('#home-contact').on('beforeSubmit', function(){ $.ajax({ method: 'post', url: '/site/send-contact', data: new FormData($(this))[0], success: function(data){ console.log(data) } }) return false }) Controller filters: 'access' => [ 'class' => AccessControl::className(), 'only' => ['logout', 'signup', 'send-contact']