Hi there, I'm having some trouble with detecting a jQuery ajax request with PHP on a Lighttpd
web server. Here's the following code (works fine on MAMP and Apache):
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
// ajax (not recognized on lighttpd server)
echo json_encode(array('success'=>1));
}
else {
// not ajax
}
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?
Thanks!