title: Ajax request returns 404 not found
body: <p>I have been trying to find a solution for this but I dont seem to find one. I get a 404 response when I try to perform the following ajax call. The code works fine on localhost but when I upload the changes on the remoter server, I get the error    </p>
  
  <pre><code>$('#button-upload').on('click', function() {
      $('#form-upload').remove();
  
      $('body').prepend('&lt;form enctype="multipart/form-data" id="form-upload" style="display: none;"&gt;&lt;input type="file" name="file" value="" /&gt;&lt;/form&gt;');
  
      $('#form-upload input[name=\'file\']').trigger('click');
  
      if (typeof timer != 'undefined') {
          clearInterval(timer);
      }
  
      timer = setInterval(function() {
          if ($('#form-upload input[name=\'file\']').val() != '') {
              clearInterval(timer);
  
              $.ajax({
                  url: 'index.php?route=common/filemanager/upload&amp;token=&lt;?php echo $token; ?&gt;&amp;directory=&lt;?php echo $directory; ?&gt;',
                  type: 'post',
                  dataType: 'json',
                  data: new FormData($('#form-upload')[0]),
                  cache: false,
                  contentType: false,
                  processData: false,
                  beforeSend: function() {
                      $('#button-upload i').replaceWith('&lt;i class="fa fa-circle-o-notch fa-spin"&gt;&lt;/i&gt;');
                      $('#button-upload').prop('disabled', true);
                  },
                  complete: function() {
                      $('#button-upload i').replaceWith('&lt;i class="fa fa-upload"&gt;&lt;/i&gt;');
                      $('#button-upload').prop('disabled', false);
                  },
                  success: function(json) {
                      if (json['error']) {
                          alert(json['error']);
                      }
  
                      if (json['success']) {
                          alert(json['success']);
  
                          $('#button-refresh').trigger('click');
                      }
                  },
                  error: function(xhr, ajaxOptions, thrownError) {
                      alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                  }
              });
          }
      }, 500);
  });
  </code></pre>
  
  <p>The console error is</p>
  
  <pre><code>POST https://example.com/admin/index.php?  route=common/filemanager/upload&amp;token=jyHPuiTt1DjdemKjNWUbeZqOtHHj4Dxw 404 (Not Found)
  </code></pre>
  
  <p>Several attempts while debugging has made my hosting provider block my IP address for security reasons. How does making the ajax request appear as a threat and do the security measures taken by my hosting provider could have caused the error? I can actually access the URL from the web address of my browser but not from the ajax call</p>