title: ajax url path (root)
body: <p>I have a website developed in ColdFusion and I use AJAX to do html requests (requests to ColdFusion Components). I'm having trouble with the AJAX URL path.</p>
  
  <p>I'm calling the AJAX from my js located:</p>
  
  <pre><code>root/folder1/folder2/js/myJS.js
  </code></pre>
  
  <p>The AJAX is:</p>
  
  <pre><code>$.ajax({
      type: "get",
      url: '/components/myComponent.cfc',
      data: {
          method:"ajaxTest",
          data: JSON.stringify(data)
      },
      dataType: "json",
      success: function(result) {
          console.debug(result);
      },
      error: function (error){
          console.debug('error');
    console.debug(error);
      }
  });
  </code></pre>
  
  <p>My component is located: </p>
  
  <pre><code>root/components/myComponent.cfc
  </code></pre>
  
  <p>However, this AJAX request returns 404 Not Found. Does anyone know why?</p>
  
  <p>Thanks</p>