title: URL mismatch for Ajax and Htaccess
body: <p>I have a htaccess rewritten but somehow my ajax call never ever reach the respective function in controller. Instead, from buglite console, it displays all the HTML code. I am writing on code igniter and I am totally exhausted regarding this matter. Please help! </p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
          RewriteEngine on
          RewriteBase /
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^(.*)\?*$ index.php/$1 [L,QSA]
      &lt;/IfModule&gt;
  
      &lt;IfModule !mod_rewrite.c&gt;       
          ErrorDocument 404 /index.php
      &lt;/IfModule&gt; 
  </code></pre>
  
  <p>In the views, attached javascript.</p>
  
  <pre><code>$('#logoutbtn').click(function(){
  
           $.ajax({
              type:"POST",
              url: "/fbcontroller/killsession",
              datatype: "json",
              success: function(){
                  alert("Logout");
              }
           });
      });
  </code></pre>
  
  <p>Error displayed in buglite.</p>
  
  <pre><code>POST /fbcontroller/killsession 404 Not Found 416ms  
  </code></pre>
  
  <p>For your information,</p>
  
  <p>I am able to access <code>http://localhost/fbcontroller/killsession</code> directly</p>