title: Ajax not sending request to php when url directory changes
body: <p>Now it is true that this query has not been asked and finally i giveup cos i cant find a switable answer to my query.<br>
  On my apache2 server i have enabled rewrite rules in .htaccess file in the root dir to persistently keep pointing everything but directories and files to a certain php file, this works perfectly but the problem the ajax script fails when the url changes it directory.</p>
  
  <p><strong>here is the php script [testing...]</strong></p>
  
  <pre><code>&lt;?php
  
  //now if run the test using the root directory, i get clear response,
  //but as i have told u, i have enabled apache2 module and added rewrite rules to .htaccess,
  //meaning that no matter hat the url is, the url will keep pointing to the same file but the problem
  // is that the ajax script does not fire p the request / send.
  //i dont jnow what i am doing wrong...
  
  if(isset($_GET['test_changes'])){
      echo 'the request has now reached the server';
      exit;
  }
  
  ?&gt;
  </code></pre>
  
  <p><strong>And here is the ajax script</strong></p>
  
  <pre><code>&lt;script&gt;
  
      //my ajax script is like this
      //the url seen below is in the root directory.
      //So briefly,how would i keep this url pointing to the same php file even if the directory changes
  
      $.ajax({
  
          url:'test.php?test_changes=123456789',
          cache:false,
          async:true,
          method:'GET',
          success:function(response){
              console.log(response)
          },
          error:function(error){
              console.log(error)
          }
  
      })
  &lt;/script&gt;
  </code></pre>