title: AJAX: "The requested URL was not found on this server" on localhost
body: <ol>
  <li>Ajax can contact the remote server nicely(uses jsonp) and beautiful data is returned.</li>
  <li>In localhost it says that the url was not found on this server.</li>
  <li>I 'alert' the url right before the ajax, copy-paste it into the browsers address bar, and beautiful data is returned.</li>
  </ol>
  
  <p>WHY?</p>
  
  <p>Oh why isn't my ajax working in localhost when the url clearly works?</p>
  
  <p>I use WAMP-server and I've created an alias directory for the project folder. Like I said, the url works because I can go to it through the address bar of the browser, but ajax fails for some reason.</p>
  
  <p>The code:</p>
  
  <pre><code>var temp_url = "localhost/api/1.1/app_dev.php/getsomething/something";
  $.ajax(
  {
      type: "GET",
      url: temp_url,
      timeout:5000, // 5 second timeout in millis!
      data:{ 'get_data' : querystring},
      dataType: "jsonp",
      cache: false,
      success: function( data, textStatus, jqXHR ) {
          console.debug(data);
      },
      error: function(jqXHR, exception)
      {
          if (jqXHR.status === 0) {
              alert('Not connect.\n Verify Network.');
          } else if (jqXHR.status == 404) {
              alert('Requested page not found. [404]');
          } else if (jqXHR.status == 500) {
              alert('Internal Server Error [500].');
          } else if (exception === 'parsererror') {
              alert('Requested JSON parse failed.');
          } else if (exception === 'timeout') {
              alert('Time out error.');
          } else if (exception === 'abort') {
              alert('Ajax request aborted.');
          } else {
              alert('Uncaught Error.\n' + jqXHR.responseText);
          }
      }
  });
  </code></pre>