title: Detecting ajax request with PHP on Lighttpd a web server
body: <p>I'm having some trouble with detecting a jQuery ajax request with PHP on a  <code>Lighttpd</code> web server. Here's the following code (works fine on MAMP and Apache):</p>
  
  <pre><code>if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) &amp;&amp; strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
       // ajax (not recognized on lighttpd server)
       echo json_encode(array('success'=&gt;1));
   }
   else {
       // not ajax
   }
  </code></pre>
  
  <p>I thought perhaps there's a certain lighttpd config that's not set correctly, but didn't see anything I recognized. Anyone have any experience with an issue like this?</p>
  
  <p>Thanks!</p>