title: Jquery ajax returning 404 not found
body: <p>I'm using Ajax to pass my form data and files to a PHP file for processing.</p>
  
  <p><strong>Javascript</strong>:</p>
  
  <pre><code>$("form#applyform").submit(function(){
  
  var data = new FormData();
  jQuery.each($('#file')[0].files, function(i, file) {
      data.append('file-'+i, file);
  });
  
  $.ajax({
      url: 'ValidateApplication.php',
      data: data,
      cache: false,
      contentType: false,
      processData: false,
      type: 'POST',
      success: function(data){
          alert(data);
      }
  });
  
  }
  </code></pre>
  
  <p><code>ValidateApplication.php</code> definitely exists. I can view it if I type in the address into the web browser, however when I submit the form chrome console returns 404.</p>
  
  <p>The PHP is in the same folder as the HTML page the JavaScript is running on so I am confused as to why I keep getting a 404.</p>
  
  <p>UPDATE</p>
  
  <p>Changing POST to GET gets rid of the 404 error, but returns a 500 Internal Server Error</p>
  
  <p>UPDATE 2</p>
  
  <p>Changing the action of the form to ="ValidateApplication.php" and submitting it as normal (without AJAX) leads to the correct file without any errors. </p>