title: A way to remove the appended url from the url parameter in $.ajax for jquery
body: <p>I am using cakephp and want to use the <code>jQuery.ajax</code> to post to my server. The issue is jQuery's <code>$.ajax</code> appends the protocol and hostname, but also includes the current controller, so I cannot change the controller I am pasting too.</p>
  
  <p>Is there a way to change the url: parameter in <code>$.ajax</code>? Here is my sample post code:</p>
  
  <pre><code> $.ajax({
          url: 'controller/action',
          type: 'post',
          data: $('#form_data').serialize(),
          dataType: 'json',
          success: function(json) {
              console.log(json);
          }
      });
  </code></pre>